Interface BytecodeEntry

All Known Implementing Classes:
BytecodeFrame, BytecodeInstruction, BytecodeLabel, BytecodeLine, BytecodeTryCatchBlock

public interface BytecodeEntry
Bytecode instruction or a label. Might be a label, a jump, a method call, etc.
Since:
0.1
  • Method Summary

    Modifier and Type
    Method
    Description
    Iterable<org.xembly.Directive>
    Convert entry to directives.
    int
    Impact of the instruction on the stack.
    boolean
    Is this instruction a conditional branch?
    boolean
    Is this instruction a goto? Is it a goto or jsr?
    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?
    Jump to a label.
    Human-readable representation.
    void
    writeTo(org.objectweb.asm.MethodVisitor visitor, AsmLabels labels)
    Write instruction to the method visitor.
  • Method Details

    • writeTo

      void writeTo(org.objectweb.asm.MethodVisitor visitor, AsmLabels labels)
      Write instruction to the method visitor.
      Parameters:
      visitor - Method visitor.
      labels - Method labels.
    • directives

      Iterable<org.xembly.Directive> directives()
      Convert entry to directives.
      Returns:
      Directives.
    • isLabel

      boolean isLabel()
      Is this instruction a label?
      Returns:
      True if it is.
    • isSwitch

      boolean isSwitch()
      Is this instruction a switch?
      Returns:
      True if it is.
    • isJump

      boolean isJump()
      Is this instruction a goto? Is it a goto or jsr?
      Returns:
      True if it is.
    • isIf

      boolean isIf()
      Is this instruction a conditional branch?
      Returns:
      True if it is.
    • isReturn

      boolean isReturn()
      Is this instruction a return statement?
      Returns:
      True if it is.
    • isThrow

      boolean isThrow()
      Is this instruction a throw statement?
      Returns:
      True if it is.
    • isOpcode

      boolean isOpcode()
      Is this instruction a regular opcode?
      Returns:
      True if it is.
    • impact

      int impact()
      Impact of the instruction on the stack.
      Returns:
      Stack impact.
    • jumps

      Jump to a label. Where to jump.
      Returns:
      Jumps.
    • view

      String view()
      Human-readable representation.
      Returns:
      Text.