Package mockit.asm

Class BaseWriter

java.lang.Object
mockit.asm.BaseWriter
Direct Known Subclasses:
ClassVisitor, FieldVisitor, MethodVisitor

public class BaseWriter extends Object
  • Field Details

    • cp

      protected ConstantPoolGeneration cp
      The dynamically generated constant pool of the class being built/modified.
    • classOrMemberAccess

      protected int classOrMemberAccess
      The access flags of this class, field, or method.
    • annotations

      @Nullable protected AnnotationVisitor annotations
      The runtime visible annotations of this class/field/method.
  • Constructor Details

    • BaseWriter

      protected BaseWriter()
    • BaseWriter

      protected BaseWriter(@NonNull ConstantPoolGeneration cp, int classOrMemberAccess)
  • Method Details

    • getConstantPoolGeneration

      @NonNull public final ConstantPoolGeneration getConstantPoolGeneration()
      Returns the constant pool generation helper object used by this writer.
      Returns:
      the constant pool generation
    • visitAnnotation

      @Nullable public AnnotationVisitor visitAnnotation(@NonNull String desc)
      Visits an annotation of the class/field/method being visited.
      Parameters:
      desc - the descriptor of the annotation type
      Returns:
      a visitor to visit the annotation values, or null if this visitor is not interested in visiting the annotation
    • visitEnd

      public void visitEnd()
      Visits the end of the class/field/method being visited. This method, which is the last one to be called, is used to inform the visitor that all the annotations and attributes of the class/field/method have been visited.
    • createMarkerAttributes

      protected final void createMarkerAttributes(int classVersion)
    • getAnnotationsSize

      protected final @org.checkerframework.checker.index.qual.NonNegative int getAnnotationsSize()
    • getMarkerAttributeCount

      protected final @org.checkerframework.checker.index.qual.NonNegative int getMarkerAttributeCount()
    • getMarkerAttributesSize

      protected final @org.checkerframework.checker.index.qual.NonNegative int getMarkerAttributesSize()
    • putAccess

      protected final void putAccess(@NonNull ByteVector out, int baseMask)
    • putMarkerAttributes

      protected final void putMarkerAttributes(@NonNull ByteVector out)
    • putAnnotations

      protected final void putAnnotations(@NonNull ByteVector out)
    • put

      protected void put(@NonNull ByteVector out)
    • put

      protected static void put(@NonNull ByteVector out, @NonNull List<? extends BaseWriter> writers)