Interface TargetAwareAnnotationProcessingService
-
- All Superinterfaces:
AnnotationProcessingService
- All Known Implementing Classes:
BaseTargetAwareAnnotationProcessingService
,JPAClassAnnotationProcessingService
,JPAFieldAnnotationProcessingService
public interface TargetAwareAnnotationProcessingService extends AnnotationProcessingService
Extension ofAnnotationProcessingService
to handle target-awareAnnotation
s.- Since:
- 1.3.1
- Author:
- Alexander Eibner, Peter Schmidt
- See Also:
AnnotationProcessingService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAnnotationProcessor(TargetAwareAnnotationProcessor annotationProcessor)
Add anTargetAwareAnnotationProcessor
to the service.java.util.Set<AnnotationProcessor>
getAllAnnotationProcessors()
Returns the set ofAnnotationProcessor
s andTargetAwareAnnotationProcessor
s registered with this service.java.util.Set<TargetAwareAnnotationProcessor>
getTargetAwareAnnotationProcessors()
Returns the set ofTargetAwareAnnotationProcessor
s registered with this service.<I extends BaseNature,A extends java.lang.annotation.Annotation>
booleanprocessAnnotation(I info, A annotation, java.lang.reflect.AnnotatedElement target)
The processing action of this service.<I extends BaseNature>
java.lang.annotation.Annotation[]processAnnotations(I info, java.lang.annotation.Annotation[] annotations, java.lang.reflect.AnnotatedElement target)
CallsAnnotationProcessingService.processAnnotation(BaseNature, Annotation)
for each given Annotation.-
Methods inherited from interface org.castor.core.annotationprocessing.AnnotationProcessingService
addAnnotationProcessor, getAnnotationProcessors, processAnnotation, processAnnotations
-
-
-
-
Method Detail
-
processAnnotations
<I extends BaseNature> java.lang.annotation.Annotation[] processAnnotations(I info, java.lang.annotation.Annotation[] annotations, java.lang.reflect.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:
AnnotationProcessingService.processAnnotation(BaseNature, Annotation)
-
processAnnotation
<I extends BaseNature,A extends java.lang.annotation.Annotation> boolean processAnnotation(I info, A annotation, java.lang.reflect.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:
TargetAwareAnnotationProcessor
-
addAnnotationProcessor
void addAnnotationProcessor(TargetAwareAnnotationProcessor annotationProcessor)
Add anTargetAwareAnnotationProcessor
to the service.- Parameters:
annotationProcessor
- theTargetAwareAnnotationProcessor
to add to this service.
-
getTargetAwareAnnotationProcessors
java.util.Set<TargetAwareAnnotationProcessor> getTargetAwareAnnotationProcessors()
Returns the set ofTargetAwareAnnotationProcessor
s registered with this service.- Returns:
- A set of
TargetAwareAnnotationProcessor
s registered with this service.
-
getAllAnnotationProcessors
java.util.Set<AnnotationProcessor> getAllAnnotationProcessors()
Returns the set ofAnnotationProcessor
s andTargetAwareAnnotationProcessor
s registered with this service.- Returns:
- A set of
AnnotationProcessor
s registered with this service.
-
-