Class BaseTargetAwareAnnotationProcessingService
java.lang.Object
org.castor.core.annotationprocessing.BaseAnnotationProcessingService
org.castor.core.annotationprocessing.BaseTargetAwareAnnotationProcessingService
- All Implemented Interfaces:
AnnotationProcessingService
,TargetAwareAnnotationProcessingService
- Direct Known Subclasses:
JPAClassAnnotationProcessingService
,JPAFieldAnnotationProcessingService
public class BaseTargetAwareAnnotationProcessingService
extends BaseAnnotationProcessingService
implements TargetAwareAnnotationProcessingService
Base implementation class to be used for implementing
AnnotationProcessingService
s.- Since:
- 1.3.1
- Author:
- Alexander Eibner, Peter Schmidt
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAnnotationProcessor
(TargetAwareAnnotationProcessor taAnnotationProcessor) Add anTargetAwareAnnotationProcessor
to the service.Returns the set ofAnnotationProcessor
s andTargetAwareAnnotationProcessor
s registered with this service.Returns the set ofTargetAwareAnnotationProcessor
s 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 theTargetAwareAnnotationProcessor
s.<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 theTargetAwareAnnotationProcessor
s.<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, getAnnotationProcessors
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.castor.core.annotationprocessing.AnnotationProcessingService
addAnnotationProcessor, getAnnotationProcessors
-
Constructor Details
-
BaseTargetAwareAnnotationProcessingService
public BaseTargetAwareAnnotationProcessingService()
-
-
Method Details
-
addAnnotationProcessor
Add anTargetAwareAnnotationProcessor
to the service.- Specified by:
addAnnotationProcessor
in interfaceTargetAwareAnnotationProcessingService
- Parameters:
taAnnotationProcessor
- theTargetAwareAnnotationProcessor
to add to this service.
-
getAllAnnotationProcessors
Returns the set ofAnnotationProcessor
s andTargetAwareAnnotationProcessor
s registered with this service.- Specified by:
getAllAnnotationProcessors
in interfaceTargetAwareAnnotationProcessingService
- Returns:
- A set of
AnnotationProcessor
s registered with this service. - See Also:
-
getTargetAwareAnnotationProcessors
Returns the set ofTargetAwareAnnotationProcessor
s registered with this service.- Specified by:
getTargetAwareAnnotationProcessors
in interfaceTargetAwareAnnotationProcessingService
- Returns:
- A set of
TargetAwareAnnotationProcessor
s 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:
processAnnotation
in 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:
processAnnotations
in 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 theTargetAwareAnnotationProcessor
s. 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:
processAnnotation
in interfaceAnnotationProcessingService
- Overrides:
processAnnotation
in 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 theTargetAwareAnnotationProcessor
s. CallsAnnotationProcessingService.processAnnotation(BaseNature, Annotation)
for each given Annotation.- Specified by:
processAnnotations
in interfaceAnnotationProcessingService
- Overrides:
processAnnotations
in 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:
-
org.castor.core.annotationprocessing.BaseAnnotationProcessingService#processAnnotations(org.castor.core.nature.BaseNature, java.lang.annotation.Annotation)
-