com.go.tea.parsetree
Class Literal

java.lang.Object
  |
  +--com.go.tea.parsetree.Node
        |
        +--com.go.tea.parsetree.Expression
              |
              +--com.go.tea.parsetree.Literal
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
BooleanLiteral, NullLiteral, NumberLiteral, StringLiteral

public abstract class Literal
extends Expression

A literal is an expression that has a constant value.

Version:
19 , 9/07/00
Author:
Brian S O'Neill
See Also:
Serialized Form

Inner classes inherited from class com.go.tea.parsetree.Expression
Expression.Conversion
 
Constructor Summary
protected Literal(SourceInfo info)
           
 
Method Summary
 java.lang.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 com.go.tea.parsetree.Expression
clone, convertTo, convertTo, getConversionChain, getInitialType, getType, getValue, isExceptionPossible, setInitialType, setType
 
Methods inherited from class com.go.tea.parsetree.Node
getSourceInfo, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Literal

protected Literal(SourceInfo info)
Method Detail

accept

public java.lang.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
Following copied from class: com.go.tea.parsetree.Node
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
Following copied from class: com.go.tea.parsetree.Expression
See Also:
Literal