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 intThe access flags of the class, field, or method currently being parsed.protected StringThe generic type signature of the class/field/method, if it has one.Fields inherited from class BytecodeReader
code, codeIndex, items -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAnnotatedReader(byte[] code) protectedAnnotatedReader(AnnotatedReader another) -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidreadAnnotations(BaseWriter visitor) protected final voidprotected abstract BooleanreadAttribute(String attributeName) Attempts to read the next attribute, provided it's one recognizable by the implementing subclass.protected final voidMethods inherited from class 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:
trueifBytecodeReader.codeIndexis already pointing to the next attribute in the classfile,falseornullotherwise; 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
-