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 Details

    • XmlInstruction

      public XmlInstruction(int opcode, Object... args)
      Constructor.
      Parameters:
      opcode - Opcode.
      args - Arguments.
    • XmlInstruction

      public XmlInstruction(boolean counting, int opcode, Object... args)
      Constructor.
      Parameters:
      counting - Add numbers for instruction names in XML.
      opcode - Opcode.
      args - Arguments.
    • XmlInstruction

      public XmlInstruction(String xml)
      Constructor.
      Parameters:
      xml - XML string that represents an instruction.
    • XmlInstruction

      public XmlInstruction(XmlNode node)
      Constructor.
      Parameters:
      node - Instruction node.
  • Method Details

    • writeTo

      public void writeTo(BytecodeMethod method)
      Description copied from interface: XmlBytecodeEntry
      Write instruction to the bytecode method.
      Specified by:
      writeTo in interface XmlBytecodeEntry
      Parameters:
      method - Bytecode Method where instruction should be written.
    • opcode

      public int opcode()
      Instruction code.
      Returns:
      Code.
    • operands

      public List<XmlOperand> operands()
      Instruction arguments.
      Returns:
      Arguments.
    • toNode

      public XmlNode toNode()
      Get XML node.
      Returns:
      XML node.