public class

ArrayTypeImpl

extends ReferenceTypeImpl
implements ArrayType
java.lang.Object
   ↳ com.sun.tools.jdi.TypeImpl
     ↳ com.sun.tools.jdi.ReferenceTypeImpl
       ↳ com.sun.tools.jdi.ArrayTypeImpl

Summary

[Expand]
Inherited Fields
From class com.sun.tools.jdi.ReferenceTypeImpl
From class com.sun.tools.jdi.TypeImpl
Protected Constructors
ArrayTypeImpl(VirtualMachine aVm, long aRef)
Public Methods
List<Method> allMethods()
Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.
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.
boolean failedToInitialize()
Determines if initialization failed for this class.
boolean isAbstract()
Determines if this type was declared abstract.
boolean isFinal()
Determines if this type was declared final.
boolean isInitialized()
Determines if this type has been initialized.
boolean isPrepared()
Determines if this type has been prepared.
boolean isVerified()
Determines if this type has been verified.
ArrayReference newInstance(int length)
Creates a new instance of this array class in the target VM.
String toString()
Returns a string representation of the object.
[Expand]
Inherited Methods
From class com.sun.tools.jdi.ReferenceTypeImpl
From class com.sun.tools.jdi.TypeImpl
From class java.lang.Object
From interface com.sun.jdi.Accessible
From interface com.sun.jdi.ArrayType
From interface com.sun.jdi.Mirror
From interface com.sun.jdi.ReferenceType
From interface com.sun.jdi.Type
From interface java.lang.Comparable

Protected Constructors

protected ArrayTypeImpl (VirtualMachine aVm, long aRef)

Public Methods

public List<Method> allMethods ()

Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces. All declared and inherited methods are included, regardless of whether they are hidden or overridden.

For arrays (ArrayType) and primitive classes, the returned list is always empty.

Returns
  • a List of Method objects; the list has length 0 if no methods exist.

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.

public Type componentType ()

Returns the component type of this array, as specified in the array declaration.

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 isPrepared() to determine if a reference type is prepared.

Returns
  • the Type of this array's components.

public String componentTypeName ()

Returns a text representation of the component type of this array.

Returns
  • a text representation of the component type.

public boolean failedToInitialize ()

Determines if initialization failed for this class. See the JVM specification for details on class initialization.

For arrays (ArrayType) and primitive classes, the return value is undefined.

Returns
  • true if initialization was attempted and failed; false otherwise.

public boolean isAbstract ()

Determines if this type was declared abstract.

For arrays (ArrayType) and primitive classes, the return value is undefined.

Returns
  • true if this type is abstract; false otherwise.

public boolean isFinal ()

Determines if this type was declared final.

For arrays (ArrayType) and primitive classes, the return value is always true.

Returns
  • true if this type is final; false otherwise.

public boolean isInitialized ()

Determines if this type has been initialized. See the JVM specification for a definition of class verification. For InterfaceType, this method always returns the same value as isPrepared().

For arrays (ArrayType) and primitive classes, the return value is undefined.

Returns
  • true if this type is initialized; false otherwise.

public boolean isPrepared ()

Determines if this type has been prepared. See the JVM specification for a definition of class preparation.

For arrays (ArrayType) and primitive classes, the return value is undefined.

Returns
  • true if this type is prepared; false otherwise.

public boolean isVerified ()

Determines if this type has been verified. See the JVM specification for a definition of class verification.

For arrays (ArrayType) and primitive classes, the return value is undefined.

Returns
  • true if this type is verified; false otherwise.

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.

public String toString ()

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
  • a string representation of the object.