org.castor.core.annotationprocessing
Interface AnnotationProcessingService

All Known Subinterfaces:
TargetAwareAnnotationProcessingService
All Known Implementing Classes:
BaseAnnotationProcessingService, BaseTargetAwareAnnotationProcessingService

public interface AnnotationProcessingService

An AnnotationProcessingService handles multiple AnnotationProcessors and uses them to process one or more Annotations.

Since:
1.3
Author:
Alexander Eibner, Peter Schmidt, Joachim Grueneis
See Also:
AnnotationProcessor

Method Summary
 void addAnnotationProcessor(AnnotationProcessor annotationProcessor)
          Add an AnnotationProcessor to the service.
 Set<AnnotationProcessor> getAnnotationProcessors()
          Returns the set of AnnotationProcessors registered with this service.
<I extends BaseNature,A extends Annotation>
boolean
processAnnotation(I info, A annotation)
          The processing action of this service.
<I extends BaseNature>
Annotation[]
processAnnotations(I info, Annotation[] annotations)
          Calls processAnnotation(BaseNature, Annotation) for each given Annotation.
 

Method Detail

processAnnotations

<I extends BaseNature> Annotation[] processAnnotations(I info,
                                                       Annotation[] annotations)
Calls processAnnotation(BaseNature, Annotation) for each given Annotation.

Parameters:
info - the BaseNature (and so its PropertyHolder) that should be filled with the information read
annotations - the annotations to process
Returns:
Annotation[] filled with unprocessed annotations
See Also:
processAnnotation(BaseNature, Annotation)

processAnnotation

<I extends BaseNature,A extends Annotation> boolean processAnnotation(I info,
                                                                      A annotation)
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 of AnnotationProcessor.processAnnotation(BaseNature, Annotation) is returned.

Parameters:
info - the BaseNature (and so its PropertyHolder) that should be filled with the information read
annotation - the annotation to process
Returns:
true, if the annotation was processed, false if not
See Also:
AnnotationProcessor

addAnnotationProcessor

void addAnnotationProcessor(AnnotationProcessor annotationProcessor)
Add an AnnotationProcessor to the service.

Parameters:
annotationProcessor - the AnnotationProcessor to add to this service.

getAnnotationProcessors

Set<AnnotationProcessor> getAnnotationProcessors()
Returns the set of AnnotationProcessors registered with this service.

Returns:
A set of AnnotationProcessors registered with this service.


Copyright © 2012. All Rights Reserved.