Overview | Package | Class | Use | Tree | Index | Help
| Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jdi
Interface ArrayType

All Superinterfaces:
  Accessible, Comparable, Mirror, ReferenceType, Type

public interface ArrayType
extends ReferenceType

Provides access to the class of an array and the type of its components in the target VM.

Since:
  1.3
See Also:
  `ArrayReference`

Method Summary
`String` | `componentSignature()` Gets the JNI signature of the components of this array class.
`Type` | `componentType()` Returns the type of the array components.
`String` | `componentTypeName()`
`ArrayReference` | `newInstance(int length)` Creates a new instance of this array class in the target VM.

Methods inherited from interface com.sun.jdi.ReferenceType
`allFields, allLineLocations, allMethods, classLoader, classObject, equals, failedToInitialize, fieldByName, fields, getValue, getValues, hashCode, isAbstract, isFinal, isInitialized, isPrepared, isStatic, isVerified, locationsOfLine, methods, methodsByName, methodsByName, name, nestedTypes, sourceName, visibleFields, visibleMethods`

Methods inherited from interface com.sun.jdi.Type
`signature`

Methods inherited from interface com.sun.jdi.Mirror
`toString, virtualMachine`

Methods inherited from interface java.lang.Comparable
`compareTo`

Methods inherited from interface com.sun.jdi.Accessible
`isPackagePrivate, isPrivate, isProtected, isPublic, modifiers`

Method Detail

### newInstance

    public ArrayReference newInstance(int length)

  Creates a new instance of this array class in the target VM. The array is created with the given length and each component is initialized to is standard default value.
  Parameters:
    `length` - the number of components in the new array
  Returns:
    the newly created `ArrayReference` mirroring the new object in the target VM.
  Throws:
    `ObjectCollectedException` - if this array type has been unloaded and garbage collected.

### componentSignature

    public String componentSignature()

  Gets the JNI signature of the components of this array class. The signature describes the declared type of the components. If the components are objects, their actual type in a particular run-time context may be a subclass of the declared class.
  Returns:
    a string containing the JNI signature of array components.
  Throws:
    `ObjectCollectedException` - if this array type has been unloaded and garbage collected.

### componentTypeName

    public String componentTypeName()

  Returns:
    a text representation of the component type.
  Throws:
    `ObjectCollectedException` - if this array type has been unloaded and garbage collected.

### componentType

    public Type componentType()
                       throws ClassNotLoadedException

  Returns the type of the array components. For primitive arrays, an appropriate `PrimitiveType` is always returned. For object arrays, the appropriate `ReferenceType` is returned if it has been loaded through the enclosing type's class loader.
  Returns:
    the `Type` of the array's components.
  Throws:
    `ClassNotLoadedException` - if the type has not yet been loaded through the appropriate class loader.
    `ObjectCollectedException` - if this array type has been unloaded and garbage collected.

Overview | Package | Class | Use | Tree | Index | Help
| Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD