Package org.eolang.opeo
Class LabelInstruction
java.lang.Object
org.eolang.opeo.LabelInstruction
- All Implemented Interfaces:
Instruction
Label instruction.
This class mimics the bytecode instruction, although it is not an instruction.
- Since:
- 0.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eolang.opeo.Instruction
Instruction.Nop
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Opcode number to mimic the bytecode instruction. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.LabelInstruction
(String identifier) Constructor.LabelInstruction
(org.eolang.jeo.representation.xmir.XmlLabel xml) Constructor.LabelInstruction
(org.objectweb.asm.Label label) Constructor. -
Method Summary
-
Field Details
-
LABEL_OPCODE
public static final int LABEL_OPCODEOpcode number to mimic the bytecode instruction. Should be higher than any number of the real instructions. See: instructions- See Also:
-
-
Constructor Details
-
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
Constructor.- Parameters:
identifier
- Label identifier.
-
-
Method Details
-
opcode
public int opcode()Description copied from interface:Instruction
Opcode number.- Specified by:
opcode
in interfaceInstruction
- Returns:
- Opcode number.
-
operand
Description copied from interface:Instruction
Retrieve operand by position index.- Specified by:
operand
in interfaceInstruction
- Parameters:
index
- Operand index- Returns:
- Operand
-
operands
Description copied from interface:Instruction
Full list of operands.- Specified by:
operands
in interfaceInstruction
- Returns:
- Operands.
-