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 Summary
Static MethodsMethods declared in interface java.lang.classfile.Instruction
opcode, sizeInBytes
-
Method Details
-
of
Returns a monitor instruction.- Parameters:
op- the opcode for the specific type of monitor instruction, which must be of kindOpcode.Kind.MONITOR- Returns:
- a monitor instruction
- Throws:
IllegalArgumentException- if the opcode kind is notOpcode.Kind.MONITOR.
-