Interface ValueExpression
public interface ValueExpression
An expression capable of evaluating itself against context objects. Encapsulates the details of a previously parsed
expression string. Provides a common abstraction for expression evaluation.
- Since:
- 3.3
- Author:
- Christoph Strobl, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionevaluate(ValueEvaluationContext context) Evaluates this expression using the given evaluation context.default ExpressionDependenciesReturns the expression dependencies.Returns the original string used to create this expression (unmodified).booleanReturns whether the expression is a literal expression (that doesn't actually require evaluation).
-
Method Details
-
getExpressionString
String getExpressionString()Returns the original string used to create this expression (unmodified).- Returns:
- the original expression string.
-
getExpressionDependencies
Returns the expression dependencies.- Returns:
- the dependencies the underlying expression requires. Can be
ExpressionDependencies.none().
-
isLiteral
boolean isLiteral()Returns whether the expression is a literal expression (that doesn't actually require evaluation).- Returns:
trueif the expression is a literal expression;falseif the expression can yield a different result uponevaluation.
-
evaluate
Evaluates this expression using the given evaluation context.- Returns:
- the evaluation result.
- Throws:
EvaluationException- if there is a problem during evaluation
-