org.apache.commons.jexl3

## Interface JexlExpression

- All Known Implementing Classes:
    Closure, Script, Script.Curried

      public interface JexlExpression

  Represents a single JEXL expression.

  This simple interface provides access to the underlying textual expression through `getSourceText()`.

  An expression is different than a script - it is simply a reference to a single expression, not to multiple statements. This implies 'if','for','while','var' and blocks '{'... '}'are NOT allowed in expressions.

  Since:
    1.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `evaluate(JexlContext context)` Evaluates the expression with the variables contained in the supplied `JexlContext`.
    `String` | `getParsedText()` Recreates the source text of this expression from the internal synactic tree.
    `String` | `getSourceText()` Returns the source text of this expression.

- - ### 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

    - #### getSourceText

          String getSourceText()

      Returns the source text of this expression.
      Returns:
        the source text

    - #### getParsedText

          String getParsedText()

      Recreates the source text of this expression from the internal synactic tree.
      Returns:
        the source text

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.