org.teatrove.tea.parsetree
Class VariableRef

java.lang.Object
  extended by org.teatrove.tea.parsetree.Node
      extended by org.teatrove.tea.parsetree.Expression
          extended by org.teatrove.tea.parsetree.VariableRef
All Implemented Interfaces:
Serializable, Cloneable, NullSafe

public class VariableRef
extends Expression
implements NullSafe

VariableRef is used to reference declared Variables.

Author:
Brian S O'Neill
See Also:
Variable, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.teatrove.tea.parsetree.Expression
Expression.Conversion
 
Constructor Summary
VariableRef(SourceInfo info, String name)
           
 
Method Summary
 Object accept(NodeVisitor visitor)
          Every subclass of Node must override this method with the following: return visitor.visit(this).
 boolean equals(Object other)
           
 String getName()
           
 Variable getVariable()
           
 int hashCode()
           
 boolean isNullSafe()
           
 void setNullSafe(boolean nullSafe)
           
 void setVariable(Variable var)
          Setting the variable resets the VariableRef's initial type, but does not clear any type conversions.
 
Methods inherited from class org.teatrove.tea.parsetree.Expression
clone, convertTo, convertTo, forceConversion, getConversionChain, getInitialType, getType, getValue, isExceptionPossible, isValueKnown, setInitialType, setType
 
Methods inherited from class org.teatrove.tea.parsetree.Node
getSourceInfo, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableRef

public VariableRef(SourceInfo info,
                   String name)
Method Detail

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

getName

public String getName()

getVariable

public Variable getVariable()

setVariable

public void setVariable(Variable var)
Setting the variable resets the VariableRef's initial type, but does not clear any type conversions.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

isNullSafe

public boolean isNullSafe()
Specified by:
isNullSafe in interface NullSafe

setNullSafe

public void setNullSafe(boolean nullSafe)
Specified by:
setNullSafe in interface NullSafe


Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.