Class LocalVariable

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

public final class LocalVariable extends Object implements AstNode, Typed
A local variable.

int local1;

Since:
0.2
  • Constructor Details

    • LocalVariable

      public LocalVariable(org.eolang.jeo.representation.xmir.XmlNode node)
      Constructor.
      Parameters:
      node - The XML node that represents variable.
    • LocalVariable

      public LocalVariable(int identifier, org.objectweb.asm.Type type)
      Constructor.
      Parameters:
      identifier - The identifier of the variable.
      type - The type of the variable.
  • Method Details

    • 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.
    • opcodes

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

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

      public AstNode store()
      Store opcode for the variable. See Opcodes.ISTORE.
      Returns:
      Opcode to store the variable. See Opcode.