Class OpcodeInstruction

  • All Implemented Interfaces:
    Instruction

    public final class OpcodeInstruction
    extends Object
    implements Instruction
    Instruction that was created directly in Java code. This class is useful for testing purposes. In real scenarios we mostly use JeoInstruction.
    Since:
    0.1
    • Constructor Detail

      • OpcodeInstruction

        public OpcodeInstruction​(int code,
                                 Object... args)
        Constructor.
        Parameters:
        code - Opcode index
        args - Operands
    • Method Detail

      • opcode

        public int opcode()
        Description copied from interface: Instruction
        Opcode number.
        Specified by:
        opcode in interface Instruction
        Returns:
        Opcode number.
      • operand

        public Object operand​(int index)
        Description copied from interface: Instruction
        Retrieve operand by position index.
        Specified by:
        operand in interface Instruction
        Parameters:
        index - Operand index
        Returns:
        Operand