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

public sealed Interface NewReferenceArrayInstruction

extends Instruction
permits BoundNewReferenceArrayInstruction, UnboundNewReferenceArrayInstruction
Known Direct Implementers
jdk.internal.classfile.impl.AbstractInstruction.BoundNewReferenceArrayInstruction, jdk.internal.classfile.impl.AbstractInstruction.UnboundNewReferenceArrayInstruction
Imports
java.lang.classfile.CodeBuilder, .CodeElement, .CodeModel, .Instruction, .Opcode, java.lang.classfile.constantpool.ClassEntry, jdk.internal.classfile.impl.AbstractInstruction

Models a anewarray instruction in the code array of a Code attribute. Delivered as a CodeElement when traversing the elements of a CodeModel.

A new reference array instruction is composite:

NewReferenceArrayInstruction(ClassEntry componentType)
NewReferenceArrayInstruction(ClassEntry componentType)
Since
24
Java Virtual Machine Specification
6.5.anewarray anewarray
See Also
Opcode.Kind#NEW_REF_ARRAY, CodeBuilder::anewarray

Method Summary

Modifier and TypeMethod and Description
public ClassEntry

Returns:

the component type of the array
componentType
()

Returns the component type of the array.

public static NewReferenceArrayInstruction

Returns:

a new reference array instruction
of
(ClassEntry
the component type of the array
componentType
)

Returns a new reference array instruction.

Inherited from java.lang.classfile.Instruction:
opcodesizeInBytes

Method Detail

componentTypeback to summary
public ClassEntry componentType()

Returns the component type of the array.

Returns:ClassEntry

the component type of the array

ofback to summary
public static NewReferenceArrayInstruction of(ClassEntry componentType)

Returns a new reference array instruction.

Parameters
componentType:ClassEntry

the component type of the array

Returns:NewReferenceArrayInstruction

a new reference array instruction