Class AnnotationProcessorImpl

    • Constructor Detail

      • AnnotationProcessorImpl

        public AnnotationProcessorImpl()
        Creates a new instance of AnnotationProcessorImpl
    • Method Detail

      • process

        public ProcessingResult process​(ProcessingContext ctx,
                                        Class[] classes)
                                 throws AnnotationProcessorException
        Process a set of classes from the parameter list rather than from the processing context. This allow the annotation handlers to call be the annotation processing tool when classes need to be processed in a particular context rather than when they are picked up by the scanner.
        Specified by:
        process in interface AnnotationProcessor
        Parameters:
        ctx - the processing context
        classes - the list of classes to process
        Returns:
        the processing result for such classes
        Throws:
        AnnotationProcessorException - if handlers fail to process an annotation
      • pushAnnotationHandler

        public void pushAnnotationHandler​(AnnotationHandler handler)
        Description copied from interface: AnnotationProcessor
        Registers a new AnnotationHandler for a particular annotation type. New annotation handler are pushed on a List of annotation handlers for that particular annotation type, the last annotation handler to be registered will be invoked first and so on. The annotation type handled by the AnnotationHandler instance is defined by the getAnnotationType() method of the AnnotationHandler instance
        Specified by:
        pushAnnotationHandler in interface AnnotationProcessor
        Parameters:
        handler - the annotation handler instance
      • pushAnnotationHandler

        public void pushAnnotationHandler​(String type,
                                          AnnotationHandler handler)
        This method is similar to pushAnnotationHandler(AnnotationHandler) except that it takes an additional String type argument which allows us to avoid extracting the information from the AnnotationHandler. Calling the AnnotationHandler can lead to its instantiation where as the annotation that a handler is responsible for handling is a metadata that can be statically extracted. This allows us to build more lazy systems.
        Parameters:
        type -
        handler -
      • getStack

        public Stack<org.glassfish.apf.impl.StackElement> getStack()