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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]arguments()Instruction arguments.booleanequals(Object other)inthashCode()booleanhasOpcode(int opcode)Check if instruction has opcode.Nodenode()Xml node.voidreplaceArguementsValues(String old, String replacement)Replace values of instruction arguments.StringtoString()voidwriteTo(BytecodeMethod method)Write instruction to the bytecode method.
-
-
-
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.
-
hasOpcode
public boolean hasOpcode(int opcode)
Description copied from interface:XmlBytecodeEntryCheck if instruction has opcode.- Specified by:
hasOpcodein interfaceXmlBytecodeEntry- Parameters:
opcode- Opcode comparing with.- Returns:
- True if instruction has opcode.
-
replaceArguementsValues
public void replaceArguementsValues(String old, String replacement)
Description copied from interface:XmlBytecodeEntryReplace values of instruction arguments.- Specified by:
replaceArguementsValuesin interfaceXmlBytecodeEntry- Parameters:
old- Old value.replacement- Which value to set instead.
-
arguments
public Object[] arguments()
Instruction arguments.- Returns:
- Arguments.
-
node
public Node node()
Description copied from interface:XmlBytecodeEntryXml node.- Specified by:
nodein interfaceXmlBytecodeEntry- Returns:
- Xml node.
-
-