-
- All Implemented Interfaces:
public abstract class InstructionBase class for all opcode instruction wrappers.
-
-
Constructor Summary
Constructors Constructor Description Instruction(Opcode opcode)
-
Method Summary
Modifier and Type Method Description final IntegergetOffset()Offset of this instruction in its parent Code attribute. final UnitsetOffset(Integer offset)Offset of this instruction in its parent Code attribute. IntegergetSize()final OpcodegetOpcode()Opcode of this instruction. IntegergetPaddedSize(Integer offset)Get the padded size in bytes of this instruction. Unitread(ByteCodeInput input)Read this instruction from the given ByteCodeInput. Unitwrite(ByteCodeOutput output)Write this instruction to the given ByteCodeOutput. -
-
Constructor Detail
-
Instruction
Instruction(Opcode opcode)
-
-
Method Detail
-
setOffset
final Unit setOffset(Integer offset)
Offset of this instruction in its parent Code attribute.
-
getPaddedSize
Integer getPaddedSize(Integer offset)
Get the padded size in bytes of this instruction. This will be the same as
sizeexcept for instances of PaddedInstruction.- Parameters:
offset- the offset at which this instruction is found.
-
read
Unit read(ByteCodeInput input)
Read this instruction from the given ByteCodeInput. Expects ByteCodeInput to be in JVM class file format and just before a instruction of this kind.
- Parameters:
input- the ByteCodeInput from which to read
-
write
Unit write(ByteCodeOutput output)
Write this instruction to the given ByteCodeOutput.
- Parameters:
output- the ByteCodeOutput to which to write
-
-
-
-