Package mockit.asm

Class AnnotatedReader

Direct Known Subclasses:
ClassReader, FieldReader, MethodReader

public abstract class AnnotatedReader extends BytecodeReader
A bytecode reader for reading common elements (signature, annotations) of a class, field, or method.
  • Field Details

    • access

      protected int access
      The access flags of the class, field, or method currently being parsed.
    • signature

      @Nullable protected String signature
      The generic type signature of the class/field/method, if it has one.
  • Constructor Details

    • AnnotatedReader

      protected AnnotatedReader(@NonNull byte[] code)
    • AnnotatedReader

      protected AnnotatedReader(@NonNull AnnotatedReader another)
  • Method Details

    • readAttributes

      protected final void readAttributes()
    • readAttribute

      @Nullable protected abstract Boolean readAttribute(@NonNull String attributeName)
      Attempts to read the next attribute, provided it's one recognizable by the implementing subclass.
      Parameters:
      attributeName - the attribute name
      Returns:
      true if BytecodeReader.codeIndex is already pointing to the next attribute in the classfile, false or null otherwise; in the case of null, the current attribute was not yet identified, but is one of the more general ones ("RuntimeVisibleAnnotations", "Deprecated", or "Synthetic")
    • readAnnotations

      protected final void readAnnotations(@NonNull BaseWriter visitor)
    • readAnnotationValues

      protected final void readAnnotationValues(@Nullable AnnotationVisitor av)