Interface JexlContext.AnnotationProcessor

Enclosing interface:
JexlContext

public static interface JexlContext.AnnotationProcessor
A marker interface of the JexlContext that processes annotations. It is used by the interpreter during evaluation to execute annotation evaluations.

If the JexlContext is not an instance of an AnnotationProcessor, encountering an annotation will generate an error or a warning depending on the engine strictness.

Since:
3.1
  • Method Details

    • processAnnotation

      Object processAnnotation(String name, Object[] args, Callable<Object> statement) throws Exception
      Processes an annotation.

      All annotations are processed through this method; the statement 'call' is to be performed within the processAnnotation method. The implementation must perform the call explicitly.

      The arguments and the statement must not be referenced or cached for longer than the duration of the processAnnotation call.

      Parameters:
      name - the annotation name
      args - the arguments of the annotation, evaluated as arguments of this call
      statement - the statement that was annotated; the processor should invoke this statement 'call' method
      Returns:
      the result of statement.call()
      Throws:
      Exception - if annotation processing fails