public class TableSwitchInstruction extends PaddedInstruction
Constructor and Description |
---|
TableSwitchInstruction(Opcode opcode)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getDefaultOffset()
Get the default offset of the branch of this instruction.
|
int |
getHighByte()
Get the upper bound for the table switch.
|
int[] |
getJumpOffsets()
Get the array of relative jump offsets for the table switch.
|
int |
getLowByte()
Get the lower bound for the table switch.
|
int |
getSize()
Get the size in bytes of this instruction.
|
void |
read(ByteCodeInput in)
Read this instruction from the given ByteCodeInput.
|
void |
setDefaultOffset(int defaultOffset)
Set the default offset of the branch of this instruction.
|
void |
setHighByte(int highByte)
Set the upper bound for the table switch.
|
void |
setJumpOffsets(int[] jumpOffsets)
Set the array of relative jump offsets for the table switch.
|
void |
setLowByte(int lowByte)
Set the lower bound for the table switch.
|
void |
write(ByteCodeOutput out)
Write this instruction to the given ByteCodeOutput.
|
getPaddedSize
getOffset, getOpcode, setOffset, setOpcode
public TableSwitchInstruction(Opcode opcode)
opcode
- the opcode.public int getSize()
AbstractInstruction
getSize
in class AbstractInstruction
public int getDefaultOffset()
public void setDefaultOffset(int defaultOffset)
defaultOffset
- the offsetpublic int getLowByte()
public void setLowByte(int lowByte)
lowByte
- the lower boundpublic int getHighByte()
public void setHighByte(int highByte)
highByte
- the upper boundpublic int[] getJumpOffsets()
public void setJumpOffsets(int[] jumpOffsets)
jumpOffsets
- the arraypublic void read(ByteCodeInput in) throws IOException
AbstractInstruction
Expects ByteCodeInput to be in JVM class file format and just before a instruction of this kind.
read
in class PaddedInstruction
in
- the ByteCodeInput from which to readIOException
- if an exception occurs with the ByteCodeInputpublic void write(ByteCodeOutput out) throws IOException
AbstractInstruction
write
in class PaddedInstruction
out
- the ByteCodeOutput to which to writeIOException
- if an exception occurs with the ByteCodeOutput