Module java.base
Package java.lang.classfile.instructionPREVIEW

# 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 `CodeElement`PREVIEW when traversing the elements of a `CodeModel`PREVIEW.

Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ClassEntryPREVIEW`
  `arrayType()`
  Returns the type of the array, as a symbolic descriptor.
  `int`
  `dimensions()`
  Returns the number of dimensions of the array.
  `static NewMultiArrayInstructionPREVIEW`
  `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

    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