Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
Version:
  $Id: Expression.java 884175 2009-11-25 16:23:41Z henrib $
Author:
  Geir Magnusson Jr.

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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