Interface Evaluator

All Known Subinterfaces:
BinaryEvaluator

@OpenApi public interface Evaluator
A basic expression evaluator interface. Implementers should realize the method to evaluate expression
  • Method Details

    • evaluate

      @OpenApi Object evaluate(OpaqueExpression expression, @CheckForNull Element object)
      Entry method for expression evaluation. Takes expression, contextual object and produces result.
      Parameters:
      expression - expression to be called
      object - contextual object of expression call
      Returns:
      expression evaluation result
    • evaluate

      @OpenApi default Object evaluate(OpaqueExpression expression, @CheckForNull Element object, List<NamedArgument> arguments)
      Entry method for expression evaluation. Takes expression, contextual object, additional arguments and produces result.
      Parameters:
      expression - expression to be called
      object - contextual object of expression call
      Returns:
      expression evaluation result
    • isExpressionGlobal

      @OpenApi boolean isExpressionGlobal(OpaqueExpression expression)
      Determines if the supplied expression is "global", i.e. if it needs contextual object to be evaluated. If expression does not need contextual object, then this expression is considered to be "global" or "static"
      Parameters:
      expression - expression to be inspected
      Returns:
      true if expression does not need the contextual object
    • getExpressionCachingKey

      @OpenApi String getExpressionCachingKey(OpaqueExpression expression)
      Calculates a string identifier of the expression. Expression evaluation results of objects are cached under this key return null if result should not be cached.
      Parameters:
      expression - expression, results of which are to be cached
      Returns:
      identifier of the expression