Class Duplicate

java.lang.Object
org.eolang.opeo.ast.Duplicate
All Implemented Interfaces:
AstNode, Typed, Xmir

public final class Duplicate extends Object implements AstNode, Typed
Duplicate. This class represents the DUP instruction in the JVM bytecode.
Since:
0.2
  • Constructor Details

    • Duplicate

      public Duplicate(AstNode original)
      Constructor.
      Parameters:
      original - The original node to duplicate.
  • Method Details

    • opcodes

      public List<AstNode> opcodes()
      Description copied from interface: AstNode
      Bytecode instructions.
      Specified by:
      opcodes in interface AstNode
      Returns:
      List of opcodes.
    • toXmir

      public Iterable<org.xembly.Directive> toXmir()
      Description copied from interface: Xmir
      Convert node to XMIR.
      Specified by:
      toXmir in interface Xmir
      Returns:
      XMIR XML.
    • type

      public org.objectweb.asm.Type type()
      Description copied from interface: Typed
      Node type.
      Specified by:
      type in interface Typed
      Returns:
      Type.
    • link

      public void link(AstNode node)
      Link the node.
      Parameters:
      node - The node to link.
    • current

      public AstNode current()
      Retrieve the current node.
      Returns:
      The current node.