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

public sealed Interface ArrayStoreInstruction

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

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

An array store instruction is composite:

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

Method Summary

Modifier and TypeMethod and Description
public static ArrayStoreInstruction

Returns:

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

Returns an array store 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 ArrayStoreInstruction of(Opcode op)

Returns an array store instruction.

Parameters
op:Opcode

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

Returns:ArrayStoreInstruction

an array store instruction

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

Returns the component type of the array. The byte type store instruction bastore also operates on boolean arrays, so this never returns boolean.

Returns:TypeKind

the component type of the array