org.castor.core.annotationprocessing
Interface TargetAwareAnnotationProcessingService

All Superinterfaces:
AnnotationProcessingService
All Known Implementing Classes:
BaseTargetAwareAnnotationProcessingService, JPAClassAnnotationProcessingService, JPAFieldAnnotationProcessingService

public interface TargetAwareAnnotationProcessingService
extends AnnotationProcessingService

Extension of AnnotationProcessingService to handle target-aware Annotations.

Since:
1.3.1
Author:
Alexander Eibner, Peter Schmidt
See Also:
AnnotationProcessingService

Method Summary
 void addAnnotationProcessor(TargetAwareAnnotationProcessor annotationProcessor)
          Add an TargetAwareAnnotationProcessor to the service.
 java.util.Set<AnnotationProcessor> getAllAnnotationProcessors()
          Returns the set of AnnotationProcessors and TargetAwareAnnotationProcessors registered with this service.
 java.util.Set<TargetAwareAnnotationProcessor> getTargetAwareAnnotationProcessors()
          Returns the set of TargetAwareAnnotationProcessors registered with this service.
<I extends BaseNature,A extends java.lang.annotation.Annotation>
boolean
processAnnotation(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)
          Calls AnnotationProcessingService.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
Calls AnnotationProcessingService.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
target - 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 of TargetAwareAnnotationProcessor.processAnnotation(BaseNature, Annotation, AnnotatedElement) is returned.

Parameters:
info - the BaseNature (and so its PropertyHolder) that should be filled with the information read
annotation - the annotation to process
target - 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 an TargetAwareAnnotationProcessor to the service.

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

getTargetAwareAnnotationProcessors

java.util.Set<TargetAwareAnnotationProcessor> getTargetAwareAnnotationProcessors()
Returns the set of TargetAwareAnnotationProcessors registered with this service.

Returns:
A set of TargetAwareAnnotationProcessors registered with this service.

getAllAnnotationProcessors

java.util.Set<AnnotationProcessor> getAllAnnotationProcessors()
Returns the set of AnnotationProcessors and TargetAwareAnnotationProcessors registered with this service.

Returns:
A set of AnnotationProcessors registered with this service.


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com