Package net.bytebuddy.asm
Class AnnotationRemoval.AnnotationRemovingMethodVisitor
- java.lang.Object
-
- org.objectweb.asm.MethodVisitor
-
- net.bytebuddy.asm.AnnotationRemoval.AnnotationRemovingMethodVisitor
-
- Enclosing class:
- AnnotationRemoval
private static class AnnotationRemoval.AnnotationRemovingMethodVisitor extends org.objectweb.asm.MethodVisitor
Creates a visitor for removing annotations from methods and method parameters.
-
-
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 java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,AnnotationDescription>>
parameterAnnotations
A map of parameter indices to maps of annotation type descriptors names and descriptors to consider for removal.
-
Constructor Summary
Constructors Modifier Constructor Description private
AnnotationRemovingMethodVisitor(org.objectweb.asm.MethodVisitor methodVisitor, ElementMatcher<? super AnnotationDescription> annotationMatcher, java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,AnnotationDescription>> parameterAnnotations, java.util.Map<java.lang.String,AnnotationDescription> annotations)
Creates an annotation removing method visitor.
-
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.AnnotationVisitor
visitParameterAnnotation(int parameter, java.lang.String descriptor, boolean visible)
-
Methods inherited from class org.objectweb.asm.MethodVisitor
getDelegate, visitAnnotableParameterCount, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFieldInsn, visitFrame, visitIincInsn, visitInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitLookupSwitchInsn, visitMaxs, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitTableSwitchInsn, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation, visitTypeInsn, visitVarInsn
-
-
-
-
Field Detail
-
annotationMatcher
private final ElementMatcher<? super AnnotationDescription> annotationMatcher
Matches annotations that should be removed.
-
parameterAnnotations
private final java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,AnnotationDescription>> parameterAnnotations
A map of parameter indices to maps of annotation type descriptors 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
-
AnnotationRemovingMethodVisitor
private AnnotationRemovingMethodVisitor(org.objectweb.asm.MethodVisitor methodVisitor, ElementMatcher<? super AnnotationDescription> annotationMatcher, java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,AnnotationDescription>> parameterAnnotations, java.util.Map<java.lang.String,AnnotationDescription> annotations)
Creates an annotation removing method visitor.- Parameters:
methodVisitor
- The method visitor to delegate to.annotationMatcher
- Matches annotations that should be removed.parameterAnnotations
- A map of parameter indices to maps of annotation type descriptors names and descriptors to consider for removal.annotations
- A map of annotation type descriptors names and descriptors to consider for removal.
-
-
Method Detail
-
visitParameterAnnotation
@MaybeNull public org.objectweb.asm.AnnotationVisitor visitParameterAnnotation(int parameter, java.lang.String descriptor, boolean visible)
- Overrides:
visitParameterAnnotation
in classorg.objectweb.asm.MethodVisitor
-
visitAnnotation
@MaybeNull public org.objectweb.asm.AnnotationVisitor visitAnnotation(java.lang.String descriptor, boolean visible)
- Overrides:
visitAnnotation
in classorg.objectweb.asm.MethodVisitor
-
-