public class AnnotationTypeFilter extends java.lang.Object implements AnnotationVisitor
AnnotationVisitor
delegates its visits to another given
AnnotationVisitor
, but only when the visited annotation has
a type that matches a given regular expression.Constructor and Description |
---|
AnnotationTypeFilter(java.lang.String regularExpression,
AnnotationVisitor annotationVisitor)
Creates a new AnnotationTypeFilter.
|
AnnotationTypeFilter(StringMatcher stringMatcher,
AnnotationVisitor annotationVisitor)
Creates a new AnnotationTypeFilter.
|
AnnotationTypeFilter(java.lang.String regularExpression,
WildcardManager wildcardManager,
AnnotationVisitor annotationVisitor)
Creates a new AnnotationTypeFilter.
|
Modifier and Type | Method and Description |
---|---|
void |
visitAnnotation(Clazz clazz,
Annotation annotation)
Visits any Annotation instance.
|
void |
visitAnnotation(Clazz clazz,
Field field,
Annotation annotation) |
void |
visitAnnotation(Clazz clazz,
Method method,
Annotation annotation) |
void |
visitAnnotation(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
Annotation annotation) |
void |
visitAnnotation(Clazz clazz,
Method method,
int parameterIndex,
Annotation annotation) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitAnnotation
public AnnotationTypeFilter(java.lang.String regularExpression, AnnotationVisitor annotationVisitor)
regularExpression
- the regular expression against which
annotation type names will be matched.annotationVisitor
- the annotation visitor to which visits
will be delegated.public AnnotationTypeFilter(java.lang.String regularExpression, WildcardManager wildcardManager, AnnotationVisitor annotationVisitor)
regularExpression
- the regular expression against which
annotation type names will be matched.wildcardManager
- an optional scope for StringMatcher instances
that match wildcards.annotationVisitor
- the annotation visitor to which visits
will be delegated.public AnnotationTypeFilter(StringMatcher stringMatcher, AnnotationVisitor annotationVisitor)
stringMatcher
- the matcher against which annotation type names
will be matched.annotationVisitor
- the annotationVisitor
to which
visits will be delegated.public void visitAnnotation(Clazz clazz, Annotation annotation)
AnnotationVisitor
visitAnnotation
in interface AnnotationVisitor
public void visitAnnotation(Clazz clazz, Field field, Annotation annotation)
visitAnnotation
in interface AnnotationVisitor
public void visitAnnotation(Clazz clazz, Method method, Annotation annotation)
visitAnnotation
in interface AnnotationVisitor
public void visitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation)
visitAnnotation
in interface AnnotationVisitor
public void visitAnnotation(Clazz clazz, Method method, CodeAttribute codeAttribute, Annotation annotation)
visitAnnotation
in interface AnnotationVisitor