Class LabelInstruction

  • All Implemented Interfaces:
    Instruction

    public final class LabelInstruction
    extends Object
    implements Instruction
    Label instruction. This class mimics the bytecode instruction, although it is not an instruction.
    Since:
    0.1
    • Field Detail

      • LABEL_OPCODE

        public static final int LABEL_OPCODE
        Opcode number to mimic the bytecode instruction. Should be higher than any number of the real instructions. See: instructions
        See Also:
        Constant Field Values
    • Constructor Detail

      • LabelInstruction

        public LabelInstruction()
        Constructor. Creates a random label.
      • LabelInstruction

        public LabelInstruction​(org.eolang.jeo.representation.xmir.XmlLabel xml)
        Constructor.
        Parameters:
        xml - XML representation of label.
      • LabelInstruction

        public LabelInstruction​(org.objectweb.asm.Label label)
        Constructor.
        Parameters:
        label - Label.
      • LabelInstruction

        public LabelInstruction​(String identifier)
        Constructor.
        Parameters:
        identifier - Label identifier.
    • 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