public class BytecodeTableSwitch extends BytecodeSwitch
Bytecodes.TABLESWITCH
bytecodes.Modifier and Type | Field and Description |
---|---|
private static int |
JUMP_OFFSET_SIZE |
private static int |
OFFSET_TO_FIRST_JUMP_OFFSET |
private static int |
OFFSET_TO_HIGH_KEY |
private static int |
OFFSET_TO_LOW_KEY |
alignedBci, bci, stream
Constructor and Description |
---|
BytecodeTableSwitch(BytecodeStream stream,
int bci)
Constructor for a
BytecodeStream . |
Modifier and Type | Method and Description |
---|---|
int |
highKey()
Gets the high key of the table switch.
|
int |
keyAt(int i)
Gets the key at
i 'th switch target index. |
int |
lowKey()
Gets the low key of the table switch.
|
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_LOW_KEY
private static final int OFFSET_TO_HIGH_KEY
private static final int OFFSET_TO_FIRST_JUMP_OFFSET
private static final int JUMP_OFFSET_SIZE
public BytecodeTableSwitch(BytecodeStream stream, int bci)
BytecodeStream
.stream
- the BytecodeStream
containing the switch instructionbci
- the index in the stream of the switch instructionpublic int lowKey()
public int highKey()
public int keyAt(int i)
BytecodeSwitch
i
'th switch target index.keyAt
in class BytecodeSwitch
i
- the switch target indexi
'th switch target indexpublic int offsetAt(int i)
BytecodeSwitch
i
'th switch target.offsetAt
in class BytecodeSwitch
i
- the switch target indexi
'th switch targetpublic int numberOfCases()
BytecodeSwitch
numberOfCases
in class BytecodeSwitch
public int size()
BytecodeSwitch
size
in class BytecodeSwitch