Package net.bytebuddy.asm
Class AnnotationRemoval.AnnotationRemovingClassVisitor
- java.lang.Object
-
- org.objectweb.asm.ClassVisitor
-
- net.bytebuddy.asm.AnnotationRemoval.AnnotationRemovingClassVisitor
-
- Enclosing class:
- AnnotationRemoval
private static class AnnotationRemoval.AnnotationRemovingClassVisitor extends org.objectweb.asm.ClassVisitor
A class visitor that removes annotations.
-
-
Field Summary
Fields Modifier and Type Field Description private ElementMatcher<? super AnnotationDescription>
annotationMatcher
Matches annotations that should be removed.private java.util.Map<java.lang.String,AnnotationDescription>
annotations
A map of annotation type descriptors names and descriptors to consider for removal.private ElementMatcher<? super FieldDescription.InDefinedShape>
fieldMatcher
Matches fields from which annotations should be removed.private java.util.Map<java.lang.String,FieldDescription.InDefinedShape>
fields
A map of internal field names and descriptors to consider for removal.private ElementMatcher<? super MethodDescription>
methodMatcher
Matches methods from which annotations should be removed.private java.util.Map<java.lang.String,MethodDescription>
methods
A map of internal method names and descriptors to consider for removal.private int
parameters
Indices the method parameter index from which annotations should be removed, or a negative value to indicate different treatment.
-
Constructor Summary
Constructors Modifier Constructor Description private
AnnotationRemovingClassVisitor(org.objectweb.asm.ClassVisitor classVisitor, ElementMatcher<? super FieldDescription.InDefinedShape> fieldMatcher, ElementMatcher<? super MethodDescription> methodMatcher, ElementMatcher<? super AnnotationDescription> annotationMatcher, int parameters, java.util.Map<java.lang.String,FieldDescription.InDefinedShape> fields, java.util.Map<java.lang.String,MethodDescription> methods, java.util.Map<java.lang.String,AnnotationDescription> annotations)
Creates a class visitor for annotation removal.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.objectweb.asm.AnnotationVisitor
visitAnnotation(java.lang.String descriptor, boolean visible)
org.objectweb.asm.FieldVisitor
visitField(int modifiers, java.lang.String internalName, java.lang.String descriptor, java.lang.String signature, java.lang.Object value)
org.objectweb.asm.MethodVisitor
visitMethod(int modifiers, java.lang.String internalName, java.lang.String descriptor, java.lang.String signature, java.lang.String[] exception)
-
-
-
Field Detail
-
fieldMatcher
private final ElementMatcher<? super FieldDescription.InDefinedShape> fieldMatcher
Matches fields from which annotations should be removed.
-
methodMatcher
private final ElementMatcher<? super MethodDescription> methodMatcher
Matches methods from which annotations should be removed.
-
annotationMatcher
private final ElementMatcher<? super AnnotationDescription> annotationMatcher
Matches annotations that should be removed.
-
parameters
private final int parameters
Indices the method parameter index from which annotations should be removed, or a negative value to indicate different treatment.
-
fields
private final java.util.Map<java.lang.String,FieldDescription.InDefinedShape> fields
A map of internal field names and descriptors to consider for removal.
-
methods
private final java.util.Map<java.lang.String,MethodDescription> methods
A map of internal method names and descriptors to consider for removal.
-
annotations
private final java.util.Map<java.lang.String,AnnotationDescription> annotations
A map of annotation type descriptors names and descriptors to consider for removal.
-
-
Constructor Detail
-
AnnotationRemovingClassVisitor
private AnnotationRemovingClassVisitor(org.objectweb.asm.ClassVisitor classVisitor, ElementMatcher<? super FieldDescription.InDefinedShape> fieldMatcher, ElementMatcher<? super MethodDescription> methodMatcher, ElementMatcher<? super AnnotationDescription> annotationMatcher, int parameters, java.util.Map<java.lang.String,FieldDescription.InDefinedShape> fields, java.util.Map<java.lang.String,MethodDescription> methods, java.util.Map<java.lang.String,AnnotationDescription> annotations)
Creates a class visitor for annotation removal.- Parameters:
classVisitor
- The class visitor to delegate to.fieldMatcher
- Matches fields from which annotations should be removed.methodMatcher
- Matches methods from which annotations should be removed.annotationMatcher
- Matches annotations that should be removed.parameters
- Indices the method parameter index from which annotations should be removed, or a negative value to indicate different treatment.fields
- A map of internal field names and descriptors to consider for removal.methods
- A map of internal method names and descriptors to consider for removal.annotations
- A map of annotation type descriptors names and descriptors to consider for removal.
-
-
Method Detail
-
visitAnnotation
@MaybeNull public org.objectweb.asm.AnnotationVisitor visitAnnotation(java.lang.String descriptor, boolean visible)
- Overrides:
visitAnnotation
in classorg.objectweb.asm.ClassVisitor
-
visitField
@MaybeNull public org.objectweb.asm.FieldVisitor visitField(int modifiers, java.lang.String internalName, java.lang.String descriptor, java.lang.String signature, java.lang.Object value)
- Overrides:
visitField
in classorg.objectweb.asm.ClassVisitor
-
visitMethod
@MaybeNull public org.objectweb.asm.MethodVisitor visitMethod(int modifiers, java.lang.String internalName, java.lang.String descriptor, java.lang.String signature, java.lang.String[] exception)
- Overrides:
visitMethod
in classorg.objectweb.asm.ClassVisitor
-
-