Top Description Methods
java.lang.classfile.instruction

public sealed Interface ArrayLoadInstruction

extends Instruction
Known Direct Implementers
jdk.internal.classfile.impl.AbstractInstruction.UnboundArrayLoadInstruction
Annotations
@PreviewFeature
feature:CLASSFILE_API
Imports
java.lang.classfile.CodeElement, .CodeModel, .Instruction, .Opcode, .TypeKind, jdk.internal.classfile.impl.AbstractInstruction, .Util, jdk.internal.javac.PreviewFeature

Preview

Second Preview of ClassFile API (JEP 466).

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. Delivered as a CodeElement when traversing the elements of a CodeModel.
Since
22

Method Summary

Modifier and TypeMethod and Description
public static ArrayLoadInstruction

Returns:

an array load instruction
of
(Opcode
the opcode for the specific type of array load instruction, which must be of kind Opcode.Kind#ARRAY_LOAD
op
)

Returns an array load instruction.

public TypeKind

Returns:

the component type of the array
typeKind
()

Returns the component type of the array.

Inherited from java.lang.classfile.Instruction:
opcodesizeInBytes

Method Detail

ofback to summary
public static ArrayLoadInstruction of(Opcode op)

Returns an array load instruction.

Parameters
op:Opcode

the opcode for the specific type of array load instruction, which must be of kind Opcode.Kind#ARRAY_LOAD

Returns:ArrayLoadInstruction

an array load instruction

Exceptions
IllegalArgumentException:
if the opcode kind is not Opcode.Kind#ARRAY_LOAD.
typeKindback to summary
public TypeKind typeKind()

Returns the component type of the array.

Returns:TypeKind

the component type of the array