Interface Expression
- All Known Implementing Classes:
ExpressionImpl
public interface Expression
Represents a single JEXL expression.
This simple interface provides access to the underlying expression through
getExpression()
.
An expression is different than a script - it is simply a reference of an expression.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptiondump()
Returns the JEXL expression by reconstructing it from the parsed tree.evaluate
(JexlContext context) Evaluates the expression with the variables contained in the suppliedJexlContext
.Returns the JEXL expression this Expression was created with.
-
Method Details
-
evaluate
Evaluates the expression with the variables contained in the suppliedJexlContext
.- Parameters:
context
- A JexlContext containing variables.- Returns:
- The result of this evaluation
- Throws:
JexlException
- on any error
-
getExpression
String getExpression()Returns the JEXL expression this Expression was created with.- Returns:
- The JEXL expression to be evaluated
-
dump
String dump()Returns the JEXL expression by reconstructing it from the parsed tree.- Returns:
- the JEXL expression
-