Class AbstractControlFlowOpcode

java.lang.Object
ai.timefold.jpyinterpreter.opcodes.controlflow.AbstractControlFlowOpcode
All Implemented Interfaces:
Opcode
Direct Known Subclasses:
ForIterOpcode, JumpAbsoluteOpcode, JumpIfFalseOrPopOpcode, JumpIfNotExcMatchOpcode, JumpIfTrueOrPopOpcode, PopJumpIfFalseOpcode, PopJumpIfIsNoneOpcode, PopJumpIfIsNotNoneOpcode, PopJumpIfTrueOpcode, RaiseVarargsOpcode, ReraiseOpcode, ReturnConstantValueOpcode, ReturnValueOpcode, SendOpcode, SetupFinallyOpcode, SetupWithOpcode

public abstract class AbstractControlFlowOpcode extends Object implements Opcode
  • Field Details

  • Constructor Details

  • Method Details

    • isJumpTarget

      public boolean isJumpTarget()
      Specified by:
      isJumpTarget in interface Opcode
      Returns:
      true if this opcode the target of a jump
    • getBytecodeIndex

      public int getBytecodeIndex()
      Description copied from interface: Opcode
      Return the bytecode index of the instruction, which can be used to identify the instruction as the target of a jump.
      Specified by:
      getBytecodeIndex in interface Opcode
      Returns:
      The bytecode index of the instruction, which is defined as the number of instructions before it in the instruction listing.
    • toString

      public String toString()
      Overrides:
      toString in class Object