public interface AnnotationProcessor<A extends Annotation,E extends CtElement> extends Processor<E>
AbstractAnnotationProcessor
,
the abstract default implementation of this interface.Modifier and Type | Method and Description |
---|---|
Set<Class<? extends A>> |
getConsumedAnnotationTypes()
Gets the annotations types consumed by this processor.
|
Set<Class<? extends A>> |
getProcessedAnnotationTypes()
Gets the annotations processed by this annotation processor, that is to
say the annotation types that trigger the
process(Annotation, CtElement) method when visiting a program
element. |
boolean |
inferConsumedAnnotationType()
Returns true (default) if the processor automatically infers the consumed
annotation type to the
A actual type. |
void |
process(A annotation,
E element)
Do the annotation processing job for a given annotation.
|
boolean |
shoudBeConsumed(CtAnnotation<? extends Annotation> annotation)
Returns true if this annotation should be removed from the processed code.
|
getEnvironment, getProcessedElementTypes, getTraversalStrategy, init, initProperties, isToBeProcessed, process, process, processingDone
getFactory, setFactory
void process(A annotation, E element)
annotation
- the annotation to processelement
- the element that holds the processed annotationsSet<Class<? extends A>> getProcessedAnnotationTypes()
process(Annotation, CtElement)
method when visiting a program
element. The processed annotation types includes all the consumed
annotation types.Set<Class<? extends A>> getConsumedAnnotationTypes()
getProcessedAnnotationTypes()
that is automatically removed from
the program once the associated processor has finished its job.boolean inferConsumedAnnotationType()
A
actual type.boolean shoudBeConsumed(CtAnnotation<? extends Annotation> annotation)
Copyright © 2007–2014 Inria. All rights reserved.