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 Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object processAnnotation​(java.lang.String name, java.lang.Object[] args, java.util.concurrent.Callable<java.lang.Object> statement)
      Processes an annotation.
    • Method Detail

      • processAnnotation

        java.lang.Object processAnnotation​(java.lang.String name,
                                           java.lang.Object[] args,
                                           java.util.concurrent.Callable<java.lang.Object> statement)
                                    throws java.lang.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:
        java.lang.Exception - if annotation processing fails