Class XmlInstruction
java.lang.Object
org.eolang.jeo.representation.xmir.XmlInstruction
- All Implemented Interfaces:
XmlBytecodeEntry
Bytecode instruction from XML.
- Since:
- 0.1
-
Constructor Summary
ConstructorsConstructorDescriptionXmlInstruction
(boolean counting, int opcode, Object... args) Constructor.XmlInstruction
(int opcode, Object... args) Constructor.XmlInstruction
(String xml) Constructor.XmlInstruction
(XmlNode node) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
opcode()
Instruction code.operands()
Instruction arguments.toNode()
Get XML node.void
writeTo
(BytecodeMethod method) Write instruction to the bytecode method.
-
Constructor Details
-
XmlInstruction
Constructor.- Parameters:
opcode
- Opcode.args
- Arguments.
-
XmlInstruction
Constructor.- Parameters:
counting
- Add numbers for instruction names in XML.opcode
- Opcode.args
- Arguments.
-
XmlInstruction
Constructor.- Parameters:
xml
- XML string that represents an instruction.
-
XmlInstruction
Constructor.- Parameters:
node
- Instruction node.
-
-
Method Details
-
writeTo
Description copied from interface:XmlBytecodeEntry
Write instruction to the bytecode method.- Specified by:
writeTo
in interfaceXmlBytecodeEntry
- Parameters:
method
- Bytecode Method where instruction should be written.
-
opcode
public int opcode()Instruction code.- Returns:
- Code.
-
operands
Instruction arguments.- Returns:
- Arguments.
-
toNode
Get XML node.- Returns:
- XML node.
-