Class AnnotationTypeFilter
- java.lang.Object
-
- proguard.classfile.attribute.annotation.visitor.AnnotationTypeFilter
-
- All Implemented Interfaces:
AnnotationVisitor
public class AnnotationTypeFilter extends java.lang.Object implements AnnotationVisitor
ThisAnnotationVisitor
delegates its visits to another givenAnnotationVisitor
, but only when the visited annotation has a type that matches a given regular expression.
-
-
Constructor Summary
Constructors Constructor Description AnnotationTypeFilter(java.lang.String regularExpression, AnnotationVisitor annotationVisitor)
Creates a new AnnotationTypeFilter.AnnotationTypeFilter(java.lang.String regularExpression, WildcardManager wildcardManager, AnnotationVisitor annotationVisitor)
Creates a new AnnotationTypeFilter.AnnotationTypeFilter(StringMatcher stringMatcher, AnnotationVisitor annotationVisitor)
Creates a new AnnotationTypeFilter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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, int parameterIndex, Annotation annotation)
void
visitAnnotation(Clazz clazz, Method method, Annotation annotation)
void
visitAnnotation(Clazz clazz, Method method, CodeAttribute codeAttribute, Annotation annotation)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.classfile.attribute.annotation.visitor.AnnotationVisitor
visitAnnotation
-
-
-
-
Constructor Detail
-
AnnotationTypeFilter
public AnnotationTypeFilter(java.lang.String regularExpression, AnnotationVisitor annotationVisitor)
Creates a new AnnotationTypeFilter.- Parameters:
regularExpression
- the regular expression against which annotation type names will be matched.annotationVisitor
- the annotation visitor to which visits will be delegated.
-
AnnotationTypeFilter
public AnnotationTypeFilter(java.lang.String regularExpression, WildcardManager wildcardManager, AnnotationVisitor annotationVisitor)
Creates a new AnnotationTypeFilter.- Parameters:
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.
-
AnnotationTypeFilter
public AnnotationTypeFilter(StringMatcher stringMatcher, AnnotationVisitor annotationVisitor)
Creates a new AnnotationTypeFilter.- Parameters:
stringMatcher
- the matcher against which annotation type names will be matched.annotationVisitor
- theannotationVisitor
to which visits will be delegated.
-
-
Method Detail
-
visitAnnotation
public void visitAnnotation(Clazz clazz, Annotation annotation)
Description copied from interface:AnnotationVisitor
Visits any Annotation instance. The more specific default implementations of this interface delegate to this method.- Specified by:
visitAnnotation
in interfaceAnnotationVisitor
-
visitAnnotation
public void visitAnnotation(Clazz clazz, Field field, Annotation annotation)
- Specified by:
visitAnnotation
in interfaceAnnotationVisitor
-
visitAnnotation
public void visitAnnotation(Clazz clazz, Method method, Annotation annotation)
- Specified by:
visitAnnotation
in interfaceAnnotationVisitor
-
visitAnnotation
public void visitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation)
- Specified by:
visitAnnotation
in interfaceAnnotationVisitor
-
visitAnnotation
public void visitAnnotation(Clazz clazz, Method method, CodeAttribute codeAttribute, Annotation annotation)
- Specified by:
visitAnnotation
in interfaceAnnotationVisitor
-
-