Package org.glassfish.apf
Annotations are defined by their annotation type. This tool assumes that annotation handlers will be registered to it to process a particular annotation type. These annotation handlers have no particular knowledge outside of the annotation they process and the annoted element on which the annotation was defined.
The AnnotationProcessor tool implementation is responsible for maintening a list of annotations handlers per annotation type. AnnotationHandler are added to the tool through the pushAnnotationHandler and can be removed through the popAnnotationHandler. Alternatively, the Factory singleton can be used to get an initialized AnnotationProcessor with all the default AnnotationHandler.
The tool uses the ProcessingContext to have access to Class instances. Each class instance will be processed in order, and if annotations are present, the tool will also process Field, Constructor and Methods elements. Each time the annotation processor switches for one particular AnnotatedElement to another, it will send start and stop events to any AnnotatedElementHandler interface implementation registered within the ProcessingContext. This allow client code to keep context information about the AnnotatedElements being processed since AnnotationHandler only know about the AnnotatedElement the annotation was defined on.
- Since:
- 9.0
-
ClassDescriptionProvides notification when the annotation processor is visiting a new AnnotatedElement.This interface defines the contract for annotation handlers and the annotation processing engine.The
Annotationhandled by this handler.Instances encapsulate all information necessary for an AnnotationHandler to process an annotation.The annotation processor is the core engine to process annotations.Exception that denotes a warning or error condition in the annotation procesing toolThis class encapsulates information about a component (usually a Jakarta EE component).Basic interfaced for annotation processing warnings and errorsThis interface defines the result of an annotation processing returned by an annotation handler.This interface defines the context for the annotation procesing handler.This interface encapsulates all AnnotatedElements processing result by the AnnotationProcessor tool.Defines the result from a single annotation processing, UNPROCESSED mean the annotation has not been processed by any handler yet, PROCESSED mean that all processing had been done and the annotation was fully processed, FAILED indicate an error condition.This interface is responsible for scanning the binary location provided and provide each binary file through a pull interfaces