Class XmlInstruction
- java.lang.Object
-
- org.eolang.jeo.representation.xmir.XmlInstruction
-
- All Implemented Interfaces:
XmlBytecodeEntry
public final class XmlInstruction extends Object implements XmlBytecodeEntry
Bytecode instruction from XML.- Since:
- 0.1
-
-
Constructor Summary
Constructors Constructor Description XmlInstruction(int opcode, Object... args)Constructor.XmlInstruction(String xml)Constructor.XmlInstruction(Node node)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)inthashCode()intopcode()Instruction code.Object[]operands()Instruction arguments.XmlNodetoNode()Get XML node.StringtoString()voidwriteTo(BytecodeMethod method)Write instruction to the bytecode method.
-
-
-
Constructor Detail
-
XmlInstruction
public XmlInstruction(String xml)
Constructor.- Parameters:
xml- XML node as String.
-
XmlInstruction
public XmlInstruction(int opcode, Object... args)Constructor.- Parameters:
opcode- Opcode.args- Arguments.
-
XmlInstruction
public XmlInstruction(Node node)
Constructor.- Parameters:
node- Instruction node.
-
-
Method Detail
-
writeTo
public void writeTo(BytecodeMethod method)
Description copied from interface:XmlBytecodeEntryWrite instruction to the bytecode method.- Specified by:
writeToin interfaceXmlBytecodeEntry- Parameters:
method- Bytecode Method where instruction should be written.
-
opcode
public int opcode()
Instruction code.- Returns:
- Code.
-
operands
public Object[] operands()
Instruction arguments.- Returns:
- Arguments.
-
toNode
public XmlNode toNode()
Get XML node.- Returns:
- XML node.
-
-