org.teatrove.tea.parsetree
Class VariableRef
java.lang.Object
org.teatrove.tea.parsetree.Node
org.teatrove.tea.parsetree.Expression
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
| Methods inherited from class org.teatrove.tea.parsetree.Expression |
clone, convertTo, convertTo, forceConversion, getConversionChain, getInitialType, getType, getValue, isExceptionPossible, isValueKnown, setInitialType, setType |
VariableRef
public VariableRef(SourceInfo info,
String name)
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.