Class BaseAnnotationProcessingService
java.lang.Object
org.castor.core.annotationprocessing.BaseAnnotationProcessingService
- All Implemented Interfaces:
AnnotationProcessingService
- Direct Known Subclasses:
BaseTargetAwareAnnotationProcessingService
An AnnotationProcessingService handles multiple
AnnotationProcessors
and uses them to process one or more Annotations. This is a standard
implementation that should be sufficient for most purposes.- Since:
- 1.3
- Author:
- Alexander Eibner, Peter Schmidt
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotationProcessor(AnnotationProcessor annotationProcessor) Add anAnnotationProcessorto the service.Returns the set ofAnnotationProcessors registered with this service.<I extends BaseNature,A extends Annotation>
booleanprocessAnnotation(I info, A annotation) The processing action of this service.<I extends BaseNature>
Annotation[]processAnnotations(I info, Annotation[] annotations) CallsAnnotationProcessingService.processAnnotation(BaseNature, Annotation)for each given Annotation.
-
Constructor Details
-
BaseAnnotationProcessingService
public BaseAnnotationProcessingService()
-
-
Method Details
-
addAnnotationProcessor
Add anAnnotationProcessorto the service.- Specified by:
addAnnotationProcessorin interfaceAnnotationProcessingService- Parameters:
annotationProcessor- theAnnotationProcessorto add to this service.
-
getAnnotationProcessors
Returns the set ofAnnotationProcessors registered with this service.- Specified by:
getAnnotationProcessorsin interfaceAnnotationProcessingService- Returns:
- A set of
AnnotationProcessors registered with this service.
-
processAnnotations
CallsAnnotationProcessingService.processAnnotation(BaseNature, Annotation)for each given Annotation.- Specified by:
processAnnotationsin interfaceAnnotationProcessingService- Parameters:
info- theBaseNature(and so itsPropertyHolder) that should be filled with the information readannotations- the annotations to process- Returns:
- Annotation[] filled with unprocessed annotations
- See Also:
-
processAnnotation
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 ofAnnotationProcessor.processAnnotation(BaseNature, Annotation)is returned.- Specified by:
processAnnotationin interfaceAnnotationProcessingService- Parameters:
info- theBaseNature(and so itsPropertyHolder) that should be filled with the information readannotation- the annotation to process- Returns:
- true, if the annotation was processed, false if not
- See Also:
-