com.go.tea.parsetree
Class StringLiteral

java.lang.Object
  |
  +--com.go.tea.parsetree.Node
        |
        +--com.go.tea.parsetree.Expression
              |
              +--com.go.tea.parsetree.Literal
                    |
                    +--com.go.tea.parsetree.StringLiteral
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class StringLiteral
extends Literal

A StringLiteral is a constant string of characters, usually delimited by quotes in a source file.

Version:
26 , 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
StringLiteral(SourceInfo info, java.lang.String value)
           
 
Method Summary
 java.lang.Object accept(NodeVisitor visitor)
          Every subclass of Node must override this method with the following: return visitor.visit(this).
 boolean equals(java.lang.Object another)
           
 java.lang.Object getValue()
          Most expressions can't generate a value at compile-time, so this method simply returns null.
 void setType(Type type)
          Sets the type of this expression, clearing the conversion chain.
 
Methods inherited from class com.go.tea.parsetree.Literal
isValueKnown
 
Methods inherited from class com.go.tea.parsetree.Expression
clone, convertTo, convertTo, getConversionChain, getInitialType, getType, isExceptionPossible, setInitialType
 
Methods inherited from class com.go.tea.parsetree.Node
getSourceInfo, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringLiteral

public StringLiteral(SourceInfo info,
                     java.lang.String value)
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 Literal
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

setType

public void setType(Type type)
Description copied from class: Expression
Sets the type of this expression, clearing the conversion chain.
Overrides:
setType in class Expression

getValue

public java.lang.Object getValue()
Description copied from class: Expression
Most expressions can't generate a value at compile-time, so this method simply returns null. Call isValueKnown to check if the expression's value is known at compile-time.
Overrides:
getValue in class Expression

equals

public boolean equals(java.lang.Object another)
Overrides:
equals in class java.lang.Object