A
- annotation typepublic abstract class AbstractSingleAnnotationProcessor<A extends Annotation> extends Object implements SingleAnnotationProcessorModule<A>
SingleAnnotationProcessorModule
implementations.Constructor and Description |
---|
AbstractSingleAnnotationProcessor(Class<A> annotationType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Class<A> |
getAnnotationType()
Retrieves the annotation type associated with this module.
|
void |
post(APUtils utils)
Called after the successful processing of all elements.
|
void |
postFailure(APUtils utils)
Called after unsuccessful processing of all elements, or if
processing was aborted due to a fatal processing error.
|
void |
pre(APUtils utils)
Called before the first element is processed.
|
void |
process(Element elem,
AnnotationMirror annotationMirror,
A annotation,
APUtils utils)
Process a single annotated element.
|
public Class<A> getAnnotationType()
SingleAnnotationProcessorModule
getAnnotationType
in interface SingleAnnotationProcessorModule<A extends Annotation>
public void pre(APUtils utils) throws Exception, ProcessingException
SingleAnnotationProcessorModule
pre
in interface SingleAnnotationProcessorModule<A extends Annotation>
utils
- the utility objectException
- if an error occursProcessingException
- if a processing-related error occurspublic void process(Element elem, AnnotationMirror annotationMirror, A annotation, APUtils utils) throws Exception, ProcessingException
SingleAnnotationProcessorModule
process
in interface SingleAnnotationProcessorModule<A extends Annotation>
elem
- the element to processannotationMirror
- the annotation mirror corresponding to the
annotation to process.annotation
- the annotation object corresponding to the annotation
to process.utils
- the utility objectException
- if an error occursProcessingException
- if a processing-related error occurspublic void post(APUtils utils) throws Exception, ProcessingException
SingleAnnotationProcessorModule
post
in interface SingleAnnotationProcessorModule<A extends Annotation>
utils
- the utility objectException
- if an error occursProcessingException
- if a processing-related error occurspublic void postFailure(APUtils utils) throws Exception, ProcessingException
SingleAnnotationProcessorModule
postFailure
in interface SingleAnnotationProcessorModule<A extends Annotation>
utils
- the utility objectException
- if an error occursProcessingException
- if a processing-related error occursCopyright © 2013–2014. All rights reserved.