Package org.apache.cxf.common.annotation
Interface AnnotationVisitor
- All Known Implementing Classes:
AbstractAnnotationVisitor
,ResourceInjector
public interface AnnotationVisitor
Visits the annotated elements of an object
-
Method Summary
Modifier and TypeMethodDescriptionList<Class<? extends Annotation>>
return the list of annotations this visitor wants to be informed about.void
set the target object being visited.void
visitClass
(Class<?> clz, Annotation annotation) visit an annotated class.void
visitField
(Field field, Annotation annotation) visit an annotated field.void
visitMethod
(Method method, Annotation annotation) visit an annotated method.
-
Method Details
-
setTarget
set the target object being visited. Invoked before any of the visit methods.- Parameters:
target
- the target object- See Also:
-
getTargetAnnotations
List<Class<? extends Annotation>> getTargetAnnotations()return the list of annotations this visitor wants to be informed about.- Returns:
- list of annotation types to be informed about
-
visitClass
visit an annotated class. Invoked when the class of an object is annotated by one of the specified annotations.visitClass
is called for each of the annotations that matches and for each class.- Parameters:
clz
- the class with the annotationannotation
- the annotation
-
visitField
visit an annotated field. Invoked when the field of an object is annotated by one of the specified annotations.visitField
is called for each of the annotations that matches and for each field.- Parameters:
field
- the annotated fieldannotation
- the annotation
-
visitMethod
visit an annotated method. Invoked when the method of an object is annotated by one of the specified annotations.visitMethod
is called for each of the annotations that matches and for each method.- Parameters:
method
- the annotated fieldxannotation
- the annotation
-