APIdia Launch Partner
Top Description Methods
java.lang.classfile.instruction

public sealed Interface ArrayLoadInstruction

extends Instruction
permits UnboundArrayLoadInstruction
Known Direct Implementers
jdk.internal.classfile.impl.AbstractInstruction.UnboundArrayLoadInstruction
Imports
java.lang.classfile.CodeBuilder, .CodeElement, .CodeModel, .Instruction, .Opcode, .TypeKind, jdk.internal.classfile.impl.AbstractInstruction, .Util

Models an array load instruction in the code array of a Code attribute. Corresponding opcodes have a kind of Opcode.Kind#ARRAY_LOAD. Delivered as a CodeElement when traversing the elements of a CodeModel.

An array load instruction is composite:

ArrayLoadInstruction(TypeKind typeKind)
ArrayLoadInstruction(TypeKind typeKind)
where typeKind is not void, and boolean is converted to byte.
Since
24
See Also
Opcode.Kind#ARRAY_LOAD, CodeBuilder::arrayLoad

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. The byte type load instruction baload also operates on boolean arrays, so this never returns boolean.

Returns:TypeKind

the component type of the array