Interface EvalContext


public interface EvalContext
Evaluation context of a specific part of an expression.
See Also:
  • Method Details

    • getBase

      Object getBase()
      The base is always null for namespace resolvers.
      Returns:
      the base object or null
    • getName

      String getName()
      Returns:
      the name of the virtual property/function
    • getParams

      List<Expression> getParams()
      A virtual method may accept any number of parameters.

      E.g. for a virtual method foo(name.length,age) the list of two expressions is returned, one for name.length and the other one for age. It is up to the consumer to evaluate the params if needed.

      Returns:
      the list of parameters, is never null
    • evaluate

      CompletionStage<Object> evaluate(String expression)
      Parse and evaluate the given expression using the relevant ResolutionContext
      Parameters:
      expression -
      Returns:
      the result
    • evaluate

      CompletionStage<Object> evaluate(Expression expression)
      Evaluate the given expression using the relevant ResolutionContext.
      Parameters:
      expression -
      Returns:
      the result
    • getAttribute

      Object getAttribute(String key)
      Parameters:
      key -
      Returns:
      the attribute or null
      See Also: