Interface MonitorInstruction
- All Superinterfaces:
- ClassFileElement,- CodeElement,- Instruction
Models a 
monitorenter or monitorexit instruction in the code array of a Code attribute.
 Corresponding opcodes have a kind of Opcode.Kind.MONITOR.  Delivered as a CodeElement when traversing the
 elements of a CodeModel.
 A monitor instruction is composite:
MonitorInstruction(Opcode opcode)
- Since:
- 24
- 
Method SummaryStatic MethodsMethods declared in interface java.lang.classfile.Instructionopcode, sizeInBytes
- 
Method Details- 
ofReturns 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
- Throws:
- IllegalArgumentException- if the opcode kind is not- Opcode.Kind.MONITOR.
 
 
-