Interface ArrayType
- All Superinterfaces:
-
Accessible
,Comparable<ReferenceType>
,Mirror
,ReferenceType
,Type
public interface ArrayType extends ReferenceType
- Since:
- 1.3
- See Also:
Method Summary
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 |
Creates a new instance of this array class in the target VM. |
Methods declared in interface com.sun.jdi.Accessible
isPackagePrivate, isPrivate, isProtected, isPublic, modifiers
Methods declared in interface java.lang.Comparable
compareTo
Methods declared in interface com.sun.jdi.Mirror
toString, virtualMachine
Methods declared in interface com.sun.jdi.ReferenceType
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
Method Details
newInstance
ArrayReference newInstance(int length)
- Parameters:
-
length
- the number of components in the new array - Returns:
- the newly created
ArrayReference
mirroring the new object in the target VM. - Throws:
-
VMCannotBeModifiedException
- if the VirtualMachine is read-only - seeVirtualMachine.canBeModified()
.
componentSignature
String componentSignature()
- Returns:
- a string containing the JNI signature of array components.
componentTypeName
String componentTypeName()
- Returns:
- a text representation of the component type.
componentType
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.
- Returns:
- the
Type
of this array's components. - Throws:
ClassNotLoadedException
- See Also:
© 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/17/docs/api/jdk.jdi/com/sun/jdi/ArrayType.html