public class VariableExpression extends Object implements Expression
VariableExpression represents a variable expression such as
$foo which returns the value of the given variable.
| Constructor and Description |
|---|
VariableExpression()
Base constructor
|
VariableExpression(String variableName)
Convenience constructor sets
VariableName property |
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(Context context)
Return the value of a context variable.
|
String |
getVariableName()
Gets the variable name
|
void |
setVariableName(String variableName)
Sets the variable name
|
String |
toString()
Returns something useful for logging
|
void |
update(Context context,
String newValue)
Do nothing
|
public VariableExpression()
public VariableExpression(String variableName)
VariableName propertyvariableName - the name of the context variable
whose value will be returned by an evaluationpublic Object evaluate(Context context)
evaluate in interface Expressioncontext - evaluate against this contextVariableName propertypublic String getVariableName()
public void setVariableName(String variableName)
variableName - the name of the context variable
whose value will be returned by an evaluationpublic void update(Context context, String newValue)
update in interface Expressioncontext - update this ContextnewValue - the new value for this expressionExpressionCopyright © 2002-2013 Apache Software Foundation. All Rights Reserved.