Class ConstantExpression
- java.lang.Object
-
- org.apache.commons.jelly.expression.ExpressionSupport
-
- org.apache.commons.jelly.expression.ConstantExpression
-
- All Implemented Interfaces:
Expression
public class ConstantExpression extends ExpressionSupport
ConstantExpression
represents a constant expression.In other words,
evaluate(org.apache.commons.jelly.JellyContext)
returns a value independent of the context.- Version:
- $Revision: 155420 $
- Author:
- James Strachan
-
-
Field Summary
-
Fields inherited from class org.apache.commons.jelly.expression.ExpressionSupport
EMPTY_ITERATOR
-
Fields inherited from interface org.apache.commons.jelly.expression.Expression
NULL
-
-
Constructor Summary
Constructors Constructor Description ConstantExpression()
Base constructorConstantExpression(Object value)
Convenience constructor setsvalue
property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
evaluate(JellyContext context)
Evaluate expression against given context.String
getExpressionText()
Object
getValue()
Gets the constant value of this expressionvoid
setValue(Object value)
Sets the constant value of this expressionString
toString()
-
Methods inherited from class org.apache.commons.jelly.expression.ExpressionSupport
evaluateAsBoolean, evaluateAsIterator, evaluateAsString, evaluateRecurse
-
-
-
-
Constructor Detail
-
ConstantExpression
public ConstantExpression()
Base constructor
-
ConstantExpression
public ConstantExpression(Object value)
Convenience constructor setsvalue
property.
-
-
Method Detail
-
getExpressionText
public String getExpressionText()
- Returns:
- the textual representation of this expression
-
evaluate
public Object evaluate(JellyContext context)
Evaluate expression against given context.- Parameters:
context
- evaluate expression against this context- Returns:
- current value of
value
property
-
getValue
public Object getValue()
Gets the constant value of this expression
-
setValue
public void setValue(Object value)
Sets the constant value of this expression
-
-