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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String dump()
      Returns the JEXL expression by reconstructing it from the parsed tree.
      java.lang.Object evaluate​(JexlContext context)
      Evaluates the expression with the variables contained in the supplied JexlContext.
      java.lang.String getExpression()
      Returns the JEXL expression this Expression was created with.
    • Method Detail

      • evaluate

        java.lang.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

        java.lang.String getExpression()
        Returns the JEXL expression this Expression was created with.
        Returns:
        The JEXL expression to be evaluated
      • dump

        java.lang.String dump()
        Returns the JEXL expression by reconstructing it from the parsed tree.
        Returns:
        the JEXL expression