Interface NewObjectInstruction
- All Superinterfaces:
ClassFileElementPREVIEW,CodeElementPREVIEW,InstructionPREVIEW
NewObjectInstruction is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models a
new instruction in the code array of a Code
attribute. Delivered as a CodeElementPREVIEW when traversing the elements
of a CodeModelPREVIEW.- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionReturns the type of object to create.static NewObjectInstructionPREVIEWof(ClassEntryPREVIEW className) Returns a new object instruction.Methods declared in interface java.lang.classfile.InstructionPREVIEW
opcode, sizeInBytes
-
Method Details
-
className
ClassEntryPREVIEW className()Returns the type of object to create.- Returns:
- the type of object to create
-
of
Returns a new object instruction.- Parameters:
className- the type of object to create- Returns:
- a new object instruction
-
NewObjectInstructionwhen preview features are enabled.