Interface MonitorInstruction

All Superinterfaces:
ClassfileElement, CodeElement, Instruction
All Known Implementing Classes:
AbstractInstruction.UnboundMonitorInstruction

public sealed interface MonitorInstruction extends Instruction permits AbstractInstruction.UnboundMonitorInstruction
Models a monitorenter or monitorexit instruction in the code array of a Code attribute. Delivered as a CodeElement when traversing the elements of a CodeModel.
  • Method Details

    • of

      static MonitorInstruction of(Opcode op)
      Returns a monitor instruction.
      Parameters:
      op - the opcode for the specific type of monitor instruction, which must be of kind Opcode.Kind.MONITOR
      Returns:
      a monitor instruction