Class BytecodeReader
java.lang.Object
mockit.asm.util.BytecodeReader
- Direct Known Subclasses:
AnnotatedReader, AnnotationReader
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBytecodeReader(byte[] code) protectedBytecodeReader(BytecodeReader another) -
Method Summary
Modifier and TypeMethodDescriptionprotected final booleanreadBoolean(@NonNegative int s4CodeIndex) protected final charreadChar(@NonNegative int s4CodeIndex) protected final StringReads the class name from the constant pool, incrementingcodeIndexby 2.protected final ObjectreadConst(@NonNegative int itemIndex) Reads a numeric or string constant pool item incode.final Objectprotected final ObjectreadConstItem(@NonNegative int u2CodeIndex) final doubleprotected final doublereadDouble(@NonNegative int s8CodeIndex) final floatprotected final floatreadFloat(@NonNegative int s4CodeIndex) final intreadInt()protected final intreadInt(@NonNegative int s4CodeIndex) Reads a signed int value incode.final @NonNegative intreadItem()final @NonNegative intreadItem(@NonNegative int u2CodeIndex) final longreadLong()protected final longreadLong(@NonNegative int s8CodeIndex) Reads a signed long value incode.final MethodHandleprotected final MethodHandlereadMethodHandleItem(@NonNegative int bsmCodeIndex) final Stringfinal StringreadNonnullClass(@NonNegative int u2CodeIndex) final Stringfinal StringreadNonnullUTF8(@NonNegative int u2CodeIndex) Reads the index of an UTF8 item incode.protected final shortprotected final shortreadShort(@NonNegative int u2CodeIndex) Reads a signed short value incode.final intfinal StringreadString(@NonNegative int itemIndex) Reads a string instringsat the given index.final @NonNegative intprotected final @NonNegative intreadUnsignedByte(@NonNegative int u1CodeIndex) Reads an unsigned byte value incode.final @NonNegative intprotected final @NonNegative intreadUnsignedShort(@NonNegative int u2CodeIndex) Reads an unsigned short value incode.protected final StringreadUTF8()protected final StringreadUTF8(@NonNegative int u2CodeIndex) Reads an UTF8 string constant pool item incode.
-
Field Details
-
code
@NonNull public final byte[] codeThe class to be parsed. The content of this array must not be modified. -
items
@NonNull public final int[] itemsThe start index of each constant pool item incode, plus one. The one byte offset skips the constant pool item tag that indicates its type. -
codeIndex
public @NonNegative int codeIndexThe next index atcodeto be read.
-
-
Constructor Details
-
BytecodeReader
protected BytecodeReader(@NonNull byte[] code) -
BytecodeReader
-
-
Method Details
-
readUnsignedByte
-
readUnsignedByte
-
readSignedByte
-
readChar
protected final char readChar(@NonNegative int s4CodeIndex) -
readBoolean
protected final boolean readBoolean(@NonNegative int s4CodeIndex) -
readUnsignedShort
-
readUnsignedShort
-
readShort
-
readShort
-
readInt
-
readInt
-
readLong
-
readLong
-
readDouble
public final double readDouble() -
readDouble
protected final double readDouble(@NonNegative int s8CodeIndex) -
readFloat
public final float readFloat() -
readFloat
protected final float readFloat(@NonNegative int s4CodeIndex) -
readUTF8
-
readUTF8
-
readNonnullUTF8
-
readNonnullUTF8
-
readString
Reads a string instringsat the given index.- Parameters:
itemIndex- the item index- Returns:
- the string
-
readConstItem
-
readConstItem
-
readConst
Reads a numeric or string constant pool item incode. -
readMethodHandle
-
readMethodHandleItem
-
readClass
-
readNonnullClass
-
readNonnullClass
-
readItem
-
readItem
public final @NonNegative int readItem(@NonNegative int u2CodeIndex)
-