public final class StaticExpression extends java.lang.Object implements Expression
| Constructor and Description |
|---|
StaticExpression(java.lang.Object value)
Create a static evaluator for the given value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getExpressionString()
Returns the original string used to create this expression, unmodified.
|
java.lang.Object |
getValue(java.lang.Object context)
Evaluate this expression in the provided context and return the result of evaluation.
|
java.lang.Class<?> |
getValueType(java.lang.Object context)
Returns the most general type that can be passed to the
Expression.setValue(Object, Object) method for the given
context. |
int |
hashCode() |
void |
setExpressionString(java.lang.String expressionString)
Sets the static expression string.
|
void |
setValue(java.lang.Object context,
java.lang.Object value)
Set this expression in the provided context to the value provided.
|
java.lang.String |
toString() |
public StaticExpression(java.lang.Object value)
value - the valuepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.Object getValue(java.lang.Object context)
throws EvaluationException
ExpressiongetValue in interface Expressioncontext - the context to evaluate this expression inEvaluationException - an exception occurred during expression evaluationpublic void setValue(java.lang.Object context,
java.lang.Object value)
throws EvaluationException
ExpressionsetValue in interface Expressioncontext - the context on which the new value should be setvalue - the new value to setEvaluationException - an exception occurred during expression evaluationpublic java.lang.Class<?> getValueType(java.lang.Object context)
ExpressionExpression.setValue(Object, Object) method for the given
context.getValueType in interface Expressioncontext - the context to evaluatenull if the type
information cannot be determinedpublic java.lang.String getExpressionString()
ExpressiongetExpressionString in interface Expressionpublic void setExpressionString(java.lang.String expressionString)
expressionString - the static expression stringpublic java.lang.String toString()
toString in class java.lang.Object