public class VariableReference extends Object implements Expression
| Constructor and Description |
|---|
VariableReference(String name)
Creates a new reference for the given variable.
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
eval(Scope scope,
Generator gen)
If possible the expression is evaluated and a simplified expression is returned.
|
String |
getName()
Returns the name of the variable.
|
boolean |
isConstant()
Determines if this expression is constant or if it depends on variables.
|
String |
toString() |
public VariableReference(String name)
name - the name of the variable to reference (without $).public String getName()
public boolean isConstant()
ExpressionisConstant in interface Expressionpublic Expression eval(Scope scope, Generator gen)
Expressioneval in interface Expressionscope - the scope used to resolve variables.gen - the generator used to evaluate functionsCopyright © 2016. All rights reserved.