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