Accessible
, Comparable<ReferenceType>
, Mirror
, ReferenceType
, Type
public interface ArrayType extends ReferenceType
ArrayReference
Modifier and Type | Method | Description |
---|---|---|
String |
componentSignature() |
Gets the JNI signature of the components of this
array class.
|
Type |
componentType() |
Returns the component type of this array,
as specified in the array declaration.
|
String |
componentTypeName() |
Returns a text representation of the component
type of this array.
|
ArrayReference |
newInstance(int length) |
Creates a new instance of this array class in the target VM.
|
isPackagePrivate, isPrivate, isProtected, isPublic, modifiers
compareTo
toString, virtualMachine
allFields, allLineLocations, allLineLocations, allMethods, availableStrata, classLoader, classObject, constantPool, constantPoolCount, defaultStratum, equals, failedToInitialize, fieldByName, fields, genericSignature, getValue, getValues, hashCode, instances, isAbstract, isFinal, isInitialized, isPrepared, isStatic, isVerified, locationsOfLine, locationsOfLine, majorVersion, methods, methodsByName, methodsByName, minorVersion, module, name, nestedTypes, sourceDebugExtension, sourceName, sourceNames, sourcePaths, visibleFields, visibleMethods
ArrayReference newInstance(int length)
length
- the number of components in the new arrayArrayReference
mirroring
the new object in the target VM.VMCannotBeModifiedException
- if the VirtualMachine is read-only - see VirtualMachine.canBeModified()
.String componentSignature()
String componentTypeName()
Type componentType() throws ClassNotLoadedException
Note: The component type of a array will always be
created or loaded before the array - see
The Java™ Virtual Machine Specification,
section 5.3.3 - Creating Array Classes.
However, although the component type will be loaded it may
not yet be prepared, in which case the type will be returned
but attempts to perform some operations on the returned type
(e.g. fields()
) will throw
a ClassNotPreparedException
.
Use ReferenceType.isPrepared()
to determine if
a reference type is prepared.
Type
of this array's components.ClassNotLoadedException
Type
,
Field.type() - for usage examples
Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1999, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-Ubuntu+0-9b154-1