org.teatrove.tea.parsetree
Class Literal
java.lang.Object
org.teatrove.tea.parsetree.Node
org.teatrove.tea.parsetree.Expression
org.teatrove.tea.parsetree.Literal
- All Implemented Interfaces:
- Serializable, Cloneable
- Direct Known Subclasses:
- BooleanLiteral, NullLiteral, NumberLiteral, StringLiteral
public abstract class Literal
- extends Expression
A literal is an expression that has a constant value.
- Author:
- Brian S O'Neill
- See Also:
- Serialized Form
|
Method Summary |
Object |
accept(NodeVisitor visitor)
Every subclass of Node must override this method with the following:
return visitor.visit(this). |
boolean |
isValueKnown()
Usually returns true, but some literals may have an unknown value if
they are converted to another type. |
| Methods inherited from class org.teatrove.tea.parsetree.Expression |
clone, convertTo, convertTo, forceConversion, getConversionChain, getInitialType, getType, getValue, isExceptionPossible, setInitialType, setType |
Literal
protected Literal(SourceInfo info)
accept
public Object accept(NodeVisitor visitor)
- Description copied from class:
Node
- Every subclass of Node must override this method with the following:
return visitor.visit(this).
- Overrides:
accept in class Expression
- Parameters:
visitor - A visitor of this Node
- Returns:
- Node The Node returned by the visitor
- See Also:
NodeVisitor
isValueKnown
public boolean isValueKnown()
- Usually returns true, but some literals may have an unknown value if
they are converted to another type.
- Overrides:
isValueKnown in class Expression
- See Also:
Literal
Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.