Package mockit.asm
Class AnnotatedReader
java.lang.Object
mockit.asm.util.BytecodeReader
mockit.asm.AnnotatedReader
- Direct Known Subclasses:
ClassReader
,FieldReader
,MethodReader
A bytecode reader for reading common elements (signature, annotations) of a class, field, or method.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The access flags of the class, field, or method currently being parsed.protected String
The generic type signature of the class/field/method, if it has one.Fields inherited from class mockit.asm.util.BytecodeReader
code, codeIndex, items
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AnnotatedReader
(byte[] code) protected
AnnotatedReader
(AnnotatedReader another) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
readAnnotations
(BaseWriter visitor) protected final void
protected abstract Boolean
readAttribute
(String attributeName) Attempts to read the next attribute, provided it's one recognizable by the implementing subclass.protected final void
Methods inherited from class mockit.asm.util.BytecodeReader
readBoolean, readChar, readClass, readConst, readConstItem, readConstItem, readDouble, readDouble, readFloat, readFloat, readInt, readInt, readItem, readItem, readLong, readLong, readMethodHandle, readMethodHandleItem, readNonnullClass, readNonnullClass, readNonnullUTF8, readNonnullUTF8, readShort, readShort, readSignedByte, readString, readUnsignedByte, readUnsignedByte, readUnsignedShort, readUnsignedShort, readUTF8, readUTF8
-
Field Details
-
access
protected int accessThe access flags of the class, field, or method currently being parsed. -
signature
The generic type signature of the class/field/method, if it has one.
-
-
Constructor Details
-
AnnotatedReader
protected AnnotatedReader(@NonNull byte[] code) -
AnnotatedReader
-
-
Method Details
-
readAttributes
protected final void readAttributes() -
readAttribute
Attempts to read the next attribute, provided it's one recognizable by the implementing subclass.- Parameters:
attributeName
- the attribute name- Returns:
true
ifBytecodeReader.codeIndex
is already pointing to the next attribute in the classfile,false
ornull
otherwise; in the case ofnull
, the current attribute was not yet identified, but is one of the more general ones ("RuntimeVisibleAnnotations", "Deprecated", or "Synthetic")
-
readAnnotations
-
readAnnotationValues
-