public class LookupSwitchInstruction extends PaddedInstruction
Constructor and Description |
---|
LookupSwitchInstruction(Opcode opcode)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getDefaultOffset()
Get the default offset of the branch of this instruction.
|
List<MatchOffsetPair> |
getMatchOffsetPairs()
Get the match-offset pairs of the branch of this instruction as
a java.util.List of MatchOffsetPair
elements.
|
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 |
setMatchOffsetPairs(List<MatchOffsetPair> matchOffsetPairs)
Set the match-offset pairs of the branch of this instruction as
a java.util.List of LookupSwitchInstruction.MatchOffsetPair
elements.
|
void |
write(ByteCodeOutput out)
Write this instruction to the given ByteCodeOutput.
|
getPaddedSize
getOffset, getOpcode, setOffset, setOpcode
public LookupSwitchInstruction(Opcode opcode)
opcode
- the opcode.public int getSize()
AbstractInstruction
getSize
in class AbstractInstruction
public int getDefaultOffset()
public void setDefaultOffset(int defaultOffset)
defaultOffset
- the offsetpublic List<MatchOffsetPair> getMatchOffsetPairs()
public void setMatchOffsetPairs(List<MatchOffsetPair> matchOffsetPairs)
matchOffsetPairs
- the listpublic 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