org.apache.commons.jexl2
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
 String dump()
          Returns the JEXL expression by reconstructing it from the parsed tree.
 Object evaluate(JexlContext context)
          Evaluates the expression with the variables contained in the supplied JexlContext.
 String getExpression()
          Returns the JEXL expression this Expression was created with.
 

Method Detail

evaluate

Object evaluate(JexlContext context)
Evaluates the expression with the variables contained in the supplied JexlContext.

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


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.