Package org.objectweb.asm.test
Class ClassFile.InstructionIndex
- java.lang.Object
-
- org.objectweb.asm.test.ClassFile.InstructionIndex
-
- Enclosing class:
- ClassFile
private static class ClassFile.InstructionIndex extends java.lang.Object
The index of a bytecode instruction. This index is computed intoString()
, from the bytecode offset of the instruction, after the whole class has been parsed. Indeed, due to forward references, the index of an instruction might not be known when its offset is used.Dumps use instruction indices instead of bytecode offsets in order to abstract away the low level byte code instruction representation details (e.g. an ldc vs. an ldc_w).
-
-
Field Summary
Fields Modifier and Type Field Description private int
bytecodeOffset
An offset in bytes from the start of the bytecode of a method.private ClassFile.MethodContext
methodContext
The context to use to find the index from the bytecode offset.
-
Constructor Summary
Constructors Constructor Description InstructionIndex(int bytecodeOffset, ClassFile.MethodContext methodContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
getBytecodeOffset()
java.lang.String
toString()
-
-
-
Field Detail
-
bytecodeOffset
private final int bytecodeOffset
An offset in bytes from the start of the bytecode of a method.
-
methodContext
private final ClassFile.MethodContext methodContext
The context to use to find the index from the bytecode offset.
-
-
Constructor Detail
-
InstructionIndex
InstructionIndex(int bytecodeOffset, ClassFile.MethodContext methodContext)
-
-