public class BytecodeLookupSwitch extends BytecodeSwitch
Bytecodes.LOOKUPSWITCH
bytecodes.Modifier and Type | Field and Description |
---|---|
private static int |
OFFSET_TO_FIRST_PAIR_MATCH |
private static int |
OFFSET_TO_FIRST_PAIR_OFFSET |
private static int |
OFFSET_TO_NUMBER_PAIRS |
private static int |
PAIR_SIZE |
alignedBci, bci, stream
Constructor and Description |
---|
BytecodeLookupSwitch(BytecodeStream stream,
int bci)
Constructor for a
BytecodeStream . |
Modifier and Type | Method and Description |
---|---|
int |
keyAt(int i)
Gets the key at
i 'th switch target index. |
int |
numberOfCases()
Gets the number of switch targets.
|
int |
offsetAt(int i)
Gets the offset from the start of the switch instruction for the
i 'th switch target. |
int |
size()
Gets the total size in bytes of the switch instruction.
|
bci, defaultOffset, defaultTarget, targetAt
private static final int OFFSET_TO_NUMBER_PAIRS
private static final int OFFSET_TO_FIRST_PAIR_MATCH
private static final int OFFSET_TO_FIRST_PAIR_OFFSET
private static final int PAIR_SIZE
public BytecodeLookupSwitch(BytecodeStream stream, int bci)
BytecodeStream
.stream
- the BytecodeStream
containing the switch instructionbci
- the index in the stream of the switch instructionpublic int offsetAt(int i)
BytecodeSwitch
i
'th switch target.offsetAt
in class BytecodeSwitch
i
- the switch target indexi
'th switch targetpublic int keyAt(int i)
BytecodeSwitch
i
'th switch target index.keyAt
in class BytecodeSwitch
i
- the switch target indexi
'th switch target indexpublic int numberOfCases()
BytecodeSwitch
numberOfCases
in class BytecodeSwitch
public int size()
BytecodeSwitch
size
in class BytecodeSwitch