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
FieldsModifier and TypeFieldDescriptionprivate final ElementMatcher<? super AnnotationDescription> Matches annotations that should be removed.private final Map<String, AnnotationDescription> A map of annotation type descriptors names and descriptors to consider for removal.private final ElementMatcher<? super FieldDescription.InDefinedShape> Matches fields from which annotations should be removed.private final Map<String, FieldDescription.InDefinedShape> A map of internal field names and descriptors to consider for removal.private final ElementMatcher<? super MethodDescription> Matches methods from which annotations should be removed.private final Map<String, MethodDescription> A map of internal method names and descriptors to consider for removal.private final intIndices the method parameter index from which annotations should be removed, or a negative value to indicate different treatment.Fields inherited from class org.objectweb.asm.ClassVisitor
api, cv -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateAnnotationRemovingClassVisitor(org.objectweb.asm.ClassVisitor classVisitor, ElementMatcher<? super FieldDescription.InDefinedShape> fieldMatcher, ElementMatcher<? super MethodDescription> methodMatcher, ElementMatcher<? super AnnotationDescription> annotationMatcher, int parameters, Map<String, FieldDescription.InDefinedShape> fields, Map<String, MethodDescription> methods, Map<String, AnnotationDescription> annotations) Creates a class visitor for annotation removal. -
Method Summary
Modifier and TypeMethodDescriptionorg.objectweb.asm.AnnotationVisitorvisitAnnotation(String descriptor, boolean visible) org.objectweb.asm.FieldVisitorvisitField(int modifiers, String internalName, String descriptor, String signature, Object value) org.objectweb.asm.MethodVisitorvisitMethod(int modifiers, String internalName, String descriptor, String signature, String[] exception) Methods inherited from class org.objectweb.asm.ClassVisitor
getDelegate, visit, visitAttribute, visitEnd, visitInnerClass, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation
-
Field Details
-
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
private final int parametersIndices 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.
-
-
Constructor Details
-
AnnotationRemovingClassVisitor
private AnnotationRemovingClassVisitor(org.objectweb.asm.ClassVisitor classVisitor, ElementMatcher<? super FieldDescription.InDefinedShape> fieldMatcher, ElementMatcher<? super MethodDescription> methodMatcher, ElementMatcher<? super AnnotationDescription> annotationMatcher, int parameters, Map<String, FieldDescription.InDefinedShape> fields, Map<String, MethodDescription> methods, Map<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 Details
-
visitAnnotation
@MaybeNull public org.objectweb.asm.AnnotationVisitor visitAnnotation(String descriptor, boolean visible) - Overrides:
visitAnnotationin classorg.objectweb.asm.ClassVisitor
-
visitField
@MaybeNull public org.objectweb.asm.FieldVisitor visitField(int modifiers, String internalName, String descriptor, String signature, Object value) - Overrides:
visitFieldin classorg.objectweb.asm.ClassVisitor
-
visitMethod
@MaybeNull public org.objectweb.asm.MethodVisitor visitMethod(int modifiers, String internalName, String descriptor, String signature, String[] exception) - Overrides:
visitMethodin classorg.objectweb.asm.ClassVisitor
-