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 Details

    • 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

      A map of internal field names and descriptors to consider for removal.
    • methods

      private final Map<String,MethodDescription> methods
      A map of internal method names and descriptors to consider for removal.
    • annotations

      private final Map<String,AnnotationDescription> 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:
      visitAnnotation in class org.objectweb.asm.ClassVisitor
    • visitField

      @MaybeNull public org.objectweb.asm.FieldVisitor visitField(int modifiers, String internalName, String descriptor, String signature, Object value)
      Overrides:
      visitField in class org.objectweb.asm.ClassVisitor
    • visitMethod

      @MaybeNull public org.objectweb.asm.MethodVisitor visitMethod(int modifiers, String internalName, String descriptor, String signature, String[] exception)
      Overrides:
      visitMethod in class org.objectweb.asm.ClassVisitor