public class AnnotationTypeFilter extends 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(String regularExpression,
AnnotationVisitor annotationVisitor)
Creates a new AnnotationTypeFilter.
|
AnnotationTypeFilter(String regularExpression,
List variableStringMatchers,
AnnotationVisitor annotationVisitor)
Creates a new AnnotationTypeFilter.
|
AnnotationTypeFilter(StringMatcher regularExpressionMatcher,
AnnotationVisitor annotationVisitor)
Creates a new AnnotationTypeFilter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
visitAnnotation(Clazz clazz,
Annotation annotation) |
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) |
public AnnotationTypeFilter(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(String regularExpression, List variableStringMatchers, AnnotationVisitor annotationVisitor)
regularExpression - the regular expression against which
annotation type names will be matched.variableStringMatchers - an optional mutable list of
VariableStringMatcher instances that match
the wildcards.annotationVisitor - the annotation visitor to which visits
will be delegated.public AnnotationTypeFilter(StringMatcher regularExpressionMatcher, AnnotationVisitor annotationVisitor)
regularExpressionMatcher - the string matcher against which
class names will be matched.annotationVisitor - the annotation visitor to which visits
will be delegated.public void visitAnnotation(Clazz clazz, Annotation annotation)
visitAnnotation in interface AnnotationVisitorpublic void visitAnnotation(Clazz clazz, Field field, Annotation annotation)
visitAnnotation in interface AnnotationVisitorpublic void visitAnnotation(Clazz clazz, Method method, Annotation annotation)
visitAnnotation in interface AnnotationVisitorpublic void visitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation)
visitAnnotation in interface AnnotationVisitorpublic void visitAnnotation(Clazz clazz, Method method, CodeAttribute codeAttribute, Annotation annotation)
visitAnnotation in interface AnnotationVisitorCopyright © 2019. All rights reserved.