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

# Interface ArrayLoadInstruction

All Superinterfaces:
  `ClassFileElementPREVIEW`, `CodeElementPREVIEW`, `InstructionPREVIEW`

public sealed interface ArrayLoadInstruction extends InstructionPREVIEW
`ArrayLoadInstruction` is a preview API of the Java platform.
Programs can only use `ArrayLoadInstruction` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models an array load instruction in the `code` array of a `Code` attribute. Corresponding opcodes will have a `kind` of `Opcode.Kind.ARRAY_LOAD`PREVIEW. Delivered as a `CodeElement`PREVIEW when traversing the elements of a `CodeModel`PREVIEW.

Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ArrayLoadInstructionPREVIEW`
  `of(OpcodePREVIEW op)`
  Returns an array load instruction.
  `TypeKindPREVIEW`
  `typeKind()`
  Returns the component type of the array.

  ### Methods declared in interface java.lang.classfile.InstructionPREVIEW

  `opcode, sizeInBytes`

- ## Method Details

  - ### typeKind

    TypeKindPREVIEW typeKind()
    Returns the component type of the array.
    Returns:
      the component type of the array

  - ### of

    static ArrayLoadInstructionPREVIEW of(OpcodePREVIEW op)
    Returns an array load instruction.
    Parameters:
      `op` - the opcode for the specific type of array load instruction, which must be of kind `Opcode.Kind.ARRAY_LOAD`PREVIEW
    Returns:
      an array load instruction