Interface NewMultiArrayInstruction
- All Superinterfaces:
ClassFileElementPREVIEW,CodeElementPREVIEW,InstructionPREVIEW
NewMultiArrayInstruction 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
multianewarray invocation 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 the array, as a symbolic descriptor.intReturns the number of dimensions of the array.of(ClassEntryPREVIEW arrayTypeEntry, int dimensions) Returns a new multi-dimensional array instruction.Methods declared in interface java.lang.classfile.InstructionPREVIEW
opcode, sizeInBytes
-
Method Details
-
arrayType
ClassEntryPREVIEW arrayType()Returns the type of the array, as a symbolic descriptor.- Returns:
- the type of the array, as a symbolic descriptor
-
dimensions
int dimensions()Returns the number of dimensions of the array.- Returns:
- the number of dimensions of the array
-
of
Returns a new multi-dimensional array instruction.- Parameters:
arrayTypeEntry- the type of the arraydimensions- the number of dimensions of the array- Returns:
- a new multi-dimensional array instruction
- Throws:
IllegalArgumentException- ifdimensionsis out of range
-
NewMultiArrayInstructionwhen preview features are enabled.