Interface TargetAwareAnnotationProcessingService
- All Superinterfaces:
AnnotationProcessingService
- All Known Implementing Classes:
BaseTargetAwareAnnotationProcessingService
Extension of
AnnotationProcessingService to handle target-aware
Annotations.- Since:
- 1.3.1
- Author:
- Alexander Eibner, Peter Schmidt
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotationProcessor(TargetAwareAnnotationProcessor annotationProcessor) Add anTargetAwareAnnotationProcessorto the service.Returns the set ofAnnotationProcessors andTargetAwareAnnotationProcessors registered with this service.Returns the set ofTargetAwareAnnotationProcessors registered with this service.<I extends BaseNature,A extends Annotation>
booleanprocessAnnotation(I info, A annotation, AnnotatedElement target) The processing action of this service.<I extends BaseNature>
Annotation[]processAnnotations(I info, Annotation[] annotations, AnnotatedElement target) CallsAnnotationProcessingService.processAnnotation(BaseNature, Annotation)for each given Annotation.Methods inherited from interface org.castor.core.annotationprocessing.AnnotationProcessingService
addAnnotationProcessor, getAnnotationProcessors, processAnnotation, processAnnotations
-
Method Details
-
processAnnotations
<I extends BaseNature> Annotation[] processAnnotations(I info, Annotation[] annotations, AnnotatedElement target) throws AnnotationTargetException CallsAnnotationProcessingService.processAnnotation(BaseNature, Annotation)for each given Annotation.- Parameters:
info- theBaseNature(and so itsPropertyHolder) that should be filled with the information readannotations- the annotations to processtarget- the target (AnnotatedElement) of the given annotation- Returns:
- Annotation[] filled with unprocessed annotations
- Throws:
AnnotationTargetException- if an annotation is used in a context that is not valid.- See Also:
-
processAnnotation
<I extends BaseNature,A extends Annotation> boolean processAnnotation(I info, A annotation, AnnotatedElement target) throws AnnotationTargetException The processing action of this service. If an annotation is given which is not supported by this processor false is returned. Otherwise the Annotations specific processor will (try to) process the Annotation and the result ofTargetAwareAnnotationProcessor.processAnnotation(BaseNature, Annotation, AnnotatedElement)is returned.- Parameters:
info- theBaseNature(and so itsPropertyHolder) that should be filled with the information readannotation- the annotation to processtarget- the target (AnnotatedElement) of the given annotation- Returns:
- true, if the annotation was processed, false if not
- Throws:
AnnotationTargetException- if an annotation is used in a context that is not valid.- See Also:
-
addAnnotationProcessor
Add anTargetAwareAnnotationProcessorto the service.- Parameters:
annotationProcessor- theTargetAwareAnnotationProcessorto add to this service.
-
getTargetAwareAnnotationProcessors
Set<TargetAwareAnnotationProcessor> getTargetAwareAnnotationProcessors()Returns the set ofTargetAwareAnnotationProcessors registered with this service.- Returns:
- A set of
TargetAwareAnnotationProcessors registered with this service.
-
getAllAnnotationProcessors
Set<AnnotationProcessor> getAllAnnotationProcessors()Returns the set ofAnnotationProcessors andTargetAwareAnnotationProcessors registered with this service.- Returns:
- A set of
AnnotationProcessors registered with this service.
-