net.sf.jse
Class LiteralFragment
java.lang.Object
|
+--net.sf.jse.Fragment
|
+--net.sf.jse.LeafFragment
|
+--net.sf.jse.LiteralFragment
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- CharacterFragment, FloatFragment, IntegerFragment, StringFragment
- public class LiteralFragment
- extends LeafFragment
Fragment that represents a Java literal
- Version:
- 0.9, 03OCT00
- Author:
- Jonathan Bachrach, Keith Playford
Methods inherited from class net.sf.jse.Fragment |
capitalize, collectBoundVariables, compilePatternElement, compileQuestionExpression, compileTemplate, die, expandMacros, expandTemplates, getChar, getCurrentLine, getFloat, getInt, getString, isTerminator, makeToken, makeToken, markMacros, setCurrentLine |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LiteralFragment
public LiteralFragment()
LiteralFragment
public LiteralFragment(antlr.Token t)
getValue
public java.lang.Object getValue()
- Description copied from class:
Fragment
- protocol for converting fragments back into Java literals
- Overrides:
getValue
in class Fragment
equals
public boolean equals(LiteralFragment x)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
generatePatternCode
public Expansion generatePatternCode(IdentifierFragment nowVar,
IdentifierFragment nextVar)
- Description copied from class:
Fragment
- Pattern matching code generator
- Overrides:
generatePatternCode
in class Fragment
- Following copied from class:
net.sf.jse.Fragment
- Parameters:
nowVar
- runtime variable bound to current input fragmentsnextVar
- where to put remaining fragments after matching- See Also:
Fragment.compilePatternElement(net.sf.jse.FragmentList, net.sf.jse.IdentifierFragment, net.sf.jse.IdentifierFragment)