Class BytecodeFrame

java.lang.Object
org.eolang.jeo.representation.bytecode.BytecodeFrame
All Implemented Interfaces:
BytecodeEntry

public final class BytecodeFrame extends Object implements BytecodeEntry
Bytecode frame.
Since:
0.6
  • Constructor Summary

    Constructors
    Constructor
    Description
    BytecodeFrame(int type, int nlocal, Object[] locals, int nstack, Object... stack)
    Constructor.
    BytecodeFrame(int type, List<Object> locals, List<Object> stack)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Iterable<org.xembly.Directive>
    directives(boolean counting)
     
    int
    Impact of the instruction on the stack.
    boolean
    Is this instruction a goto?
    boolean
    Is this instruction a conditional branch?
    boolean
    Is this instruction a label?
    boolean
    Is this instruction a regular opcode?
    boolean
    Is this instruction a return statement?
    boolean
    Is this instruction a switch?
    boolean
    Is this instruction a throw statement?
    List<org.objectweb.asm.Label>
    Jump to a label.
    void
    writeTo(org.objectweb.asm.MethodVisitor visitor)
    Write instruction to the method visitor.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BytecodeFrame

      public BytecodeFrame(int type, List<Object> locals, List<Object> stack)
      Constructor.
      Parameters:
      type - Frame type.
      locals - Local variables.
      stack - Stack elements.
    • BytecodeFrame

      public BytecodeFrame(int type, int nlocal, Object[] locals, int nstack, Object... stack)
      Constructor.
      Parameters:
      type - Frame type.
      nlocal - Number of local variables.
      locals - Local variables.
      nstack - Number of stack elements.
      stack - Stack elements.
  • Method Details

    • writeTo

      public void writeTo(org.objectweb.asm.MethodVisitor visitor)
      Description copied from interface: BytecodeEntry
      Write instruction to the method visitor.
      Specified by:
      writeTo in interface BytecodeEntry
      Parameters:
      visitor - Method visitor.
    • directives

      public Iterable<org.xembly.Directive> directives(boolean counting)
      Specified by:
      directives in interface BytecodeEntry
    • isLabel

      public boolean isLabel()
      Description copied from interface: BytecodeEntry
      Is this instruction a label?
      Specified by:
      isLabel in interface BytecodeEntry
      Returns:
      True if it is.
    • isSwitch

      public boolean isSwitch()
      Description copied from interface: BytecodeEntry
      Is this instruction a switch?
      Specified by:
      isSwitch in interface BytecodeEntry
      Returns:
      True if it is.
    • isGoto

      public boolean isGoto()
      Description copied from interface: BytecodeEntry
      Is this instruction a goto?
      Specified by:
      isGoto in interface BytecodeEntry
      Returns:
      True if it is.
    • isIf

      public boolean isIf()
      Description copied from interface: BytecodeEntry
      Is this instruction a conditional branch?
      Specified by:
      isIf in interface BytecodeEntry
      Returns:
      True if it is.
    • isReturn

      public boolean isReturn()
      Description copied from interface: BytecodeEntry
      Is this instruction a return statement?
      Specified by:
      isReturn in interface BytecodeEntry
      Returns:
      True if it is.
    • isThrow

      public boolean isThrow()
      Description copied from interface: BytecodeEntry
      Is this instruction a throw statement?
      Specified by:
      isThrow in interface BytecodeEntry
      Returns:
      True if it is.
    • isOpcode

      public boolean isOpcode()
      Description copied from interface: BytecodeEntry
      Is this instruction a regular opcode?
      Specified by:
      isOpcode in interface BytecodeEntry
      Returns:
      True if it is.
    • impact

      public int impact()
      Description copied from interface: BytecodeEntry
      Impact of the instruction on the stack.
      Specified by:
      impact in interface BytecodeEntry
      Returns:
      Stack impact.
    • jumps

      public List<org.objectweb.asm.Label> jumps()
      Description copied from interface: BytecodeEntry
      Jump to a label. Where to jump.
      Specified by:
      jumps in interface BytecodeEntry
      Returns:
      Jumps.