public class ImmediateByteInstruction extends AbstractInstruction
Modifier and Type | Field and Description |
---|---|
protected boolean |
wide
Indicates whether the instruction is subject to a wide instruction or not.
|
Constructor and Description |
---|
ImmediateByteInstruction(Opcode opcode,
boolean wide)
Constructor.
|
ImmediateByteInstruction(Opcode opcode,
boolean wide,
int immediateByte)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getImmediateByte()
Get the immediate unsigned byte of this instruction.
|
int |
getSize()
Get the size in bytes of this instruction.
|
boolean |
isWide()
Check whether the instruction is subject to a wide instruction or not.
|
void |
read(ByteCodeInput in)
Read this instruction from the given ByteCodeInput.
|
void |
setImmediateByte(int immediateByte)
Set the immediate unsigned byte of this instruction.
|
void |
setWide(boolean wide)
Set whether the instruction is subject to a wide instruction or not.
|
void |
write(ByteCodeOutput out)
Write this instruction to the given ByteCodeOutput.
|
getOffset, getOpcode, setOffset, setOpcode
protected boolean wide
public ImmediateByteInstruction(Opcode opcode, boolean wide)
opcode
- the opcodewide
- whether the instruction is a wide instruction.public ImmediateByteInstruction(Opcode opcode, boolean wide, int immediateByte)
opcode
- the opcodewide
- whether the instruction is a wide instruction.immediateByte
- the immediate byte value.public int getSize()
AbstractInstruction
getSize
in class AbstractInstruction
public int getImmediateByte()
public void setImmediateByte(int immediateByte)
immediateByte
- the bytepublic boolean isWide()
public void setWide(boolean wide)
wide
- wide or notpublic 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 AbstractInstruction
in
- the ByteCodeInput from which to readIOException
- if an exception occurs with the ByteCodeInputpublic void write(ByteCodeOutput out) throws IOException
AbstractInstruction
write
in class AbstractInstruction
out
- the ByteCodeOutput to which to writeIOException
- if an exception occurs with the ByteCodeOutput