public abstract class AbstractAnnotationVisitor extends Object implements AnnotationVisitor
| Modifier and Type | Field and Description |
|---|---|
protected Object |
target |
protected Class<?> |
targetClass |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAnnotationVisitor(Class<? extends Annotation> ann) |
protected |
AbstractAnnotationVisitor(List<Class<? extends Annotation>> ann) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTargetAnnotation(Class<? extends Annotation> ann) |
Object |
getTarget() |
List<Class<? extends Annotation>> |
getTargetAnnotations()
return the list of annotations this visitor wants to be
informed about.
|
Class<?> |
getTargetClass() |
void |
setTarget(Object object)
set the target object being visited.
|
void |
setTarget(Object object,
Class<?> cls) |
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.
|
protected AbstractAnnotationVisitor(Class<? extends Annotation> ann)
protected AbstractAnnotationVisitor(List<Class<? extends Annotation>> ann)
protected final void addTargetAnnotation(Class<? extends Annotation> ann)
public void visitClass(Class<?> clz, Annotation annotation)
AnnotationVisitorvisitClass is called for each of the annotations
that matches and for each class.visitClass in interface AnnotationVisitorclz - the class with the annotationannotation - the annotationpublic List<Class<? extends Annotation>> getTargetAnnotations()
AnnotationVisitorgetTargetAnnotations in interface AnnotationVisitorpublic void visitField(Field field, Annotation annotation)
AnnotationVisitorvisitField is called for each of the annotations
that matches and for each field.visitField in interface AnnotationVisitorfield - the annotated fieldannotation - the annotationpublic void visitMethod(Method method, Annotation annotation)
AnnotationVisitorvisitMethod is called for each of the annotations
that matches and for each method.visitMethod in interface AnnotationVisitormethod - the annotated fieldxannotation - the annotationpublic void setTarget(Object object)
AnnotationVisitorsetTarget in interface AnnotationVisitorobject - the target objectAnnotationProcessorpublic Object getTarget()
public Class<?> getTargetClass()
Apache CXF