Class BaseTargetAwareAnnotationProcessingService
java.lang.Object
org.castor.core.annotationprocessing.BaseAnnotationProcessingService
org.castor.core.annotationprocessing.BaseTargetAwareAnnotationProcessingService
- All Implemented Interfaces:
AnnotationProcessingService,TargetAwareAnnotationProcessingService
public class BaseTargetAwareAnnotationProcessingService
extends BaseAnnotationProcessingService
implements TargetAwareAnnotationProcessingService
Base implementation class to be used for implementing
AnnotationProcessingServices.- Since:
- 1.3.1
- Author:
- Alexander Eibner, Peter Schmidt
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotationProcessor(TargetAwareAnnotationProcessor taAnnotationProcessor) 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) This method acts like it's super method, but also tries to process the annotation with theTargetAwareAnnotationProcessors.<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) This method acts like it's super method, but also tries to process the annotations with theTargetAwareAnnotationProcessors.<I extends BaseNature>
Annotation[]processAnnotations(I info, Annotation[] annotations, AnnotatedElement target) CallsAnnotationProcessingService.processAnnotation(BaseNature, Annotation)for each given Annotation.Methods inherited from class org.castor.core.annotationprocessing.BaseAnnotationProcessingService
addAnnotationProcessor, getAnnotationProcessorsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.castor.core.annotationprocessing.AnnotationProcessingService
addAnnotationProcessor, getAnnotationProcessors
-
Constructor Details
-
BaseTargetAwareAnnotationProcessingService
public BaseTargetAwareAnnotationProcessingService()
-
-
Method Details
-
addAnnotationProcessor
Add anTargetAwareAnnotationProcessorto the service.- Specified by:
addAnnotationProcessorin interfaceTargetAwareAnnotationProcessingService- Parameters:
taAnnotationProcessor- theTargetAwareAnnotationProcessorto add to this service.
-
getAllAnnotationProcessors
Returns the set ofAnnotationProcessors andTargetAwareAnnotationProcessors registered with this service.- Specified by:
getAllAnnotationProcessorsin interfaceTargetAwareAnnotationProcessingService- Returns:
- A set of
AnnotationProcessors registered with this service. - See Also:
-
getTargetAwareAnnotationProcessors
Returns the set ofTargetAwareAnnotationProcessors registered with this service.- Specified by:
getTargetAwareAnnotationProcessorsin interfaceTargetAwareAnnotationProcessingService- Returns:
- A set of
TargetAwareAnnotationProcessors registered with this service. - See Also:
-
processAnnotation
public <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.- Specified by:
processAnnotationin interfaceTargetAwareAnnotationProcessingService- 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:
-
processAnnotations
public <I extends BaseNature> Annotation[] processAnnotations(I info, Annotation[] annotations, AnnotatedElement target) throws AnnotationTargetException CallsAnnotationProcessingService.processAnnotation(BaseNature, Annotation)for each given Annotation.- Specified by:
processAnnotationsin interfaceTargetAwareAnnotationProcessingService- 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
This method acts like it's super method, but also tries to process the annotation with theTargetAwareAnnotationProcessors. 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- Overrides:
processAnnotationin classBaseAnnotationProcessingService- 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:
-
processAnnotations
This method acts like it's super method, but also tries to process the annotations with theTargetAwareAnnotationProcessors. CallsAnnotationProcessingService.processAnnotation(BaseNature, Annotation)for each given Annotation.- Specified by:
processAnnotationsin interfaceAnnotationProcessingService- Overrides:
processAnnotationsin classBaseAnnotationProcessingService- 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:
-