Class BytecodeLabel

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

public final class BytecodeLabel extends Object implements BytecodeEntry
Mark label instruction.
Since:
0.1
  • Constructor Details

    • BytecodeLabel

      public BytecodeLabel()
      Constructor.
    • BytecodeLabel

      public BytecodeLabel(byte[] uid)
      Constructor.
      Parameters:
      uid - Identifier.
    • BytecodeLabel

      public BytecodeLabel(String label)
      Constructor.
      Parameters:
      label - Identifier.
  • Method Details

    • writeTo

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

      public Iterable<org.xembly.Directive> directives()
      Description copied from interface: BytecodeEntry
      Convert entry to directives.
      Specified by:
      directives in interface BytecodeEntry
      Returns:
      Directives.
    • 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.
    • isJump

      public boolean isJump()
      Description copied from interface: BytecodeEntry
      Is this instruction a goto? Is it a goto or jsr?
      Specified by:
      isJump 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<BytecodeLabel> jumps()
      Description copied from interface: BytecodeEntry
      Jump to a label. Where to jump.
      Specified by:
      jumps in interface BytecodeEntry
      Returns:
      Jumps.
    • view

      public String view()
      Description copied from interface: BytecodeEntry
      Human-readable representation.
      Specified by:
      view in interface BytecodeEntry
      Returns:
      Text.
    • uid

      public String uid()