Interface NewMultiArrayInstruction

All Superinterfaces:
ClassFileElementPREVIEW, CodeElementPREVIEW, InstructionPREVIEW

public sealed interface NewMultiArrayInstruction extends InstructionPREVIEW
NewMultiArrayInstruction is a preview API of the Java platform.
Programs can only use NewMultiArrayInstruction when preview features are enabled.
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 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

      static NewMultiArrayInstructionPREVIEW of(ClassEntryPREVIEW arrayTypeEntry, int dimensions)
      Returns a new multi-dimensional array instruction.
      Parameters:
      arrayTypeEntry - the type of the array
      dimensions - the number of dimensions of the array
      Returns:
      a new multi-dimensional array instruction