org.netbeans.api.debugger.jpda/2 2.31.1

org.netbeans.api.debugger.jpda
Interface JPDAClassType

All Superinterfaces:
VariableType
All Known Subinterfaces:
JPDAArrayType

public interface JPDAClassType
extends VariableType

Represents type of an object (class, interface, array) in the debugged process.

 Since JDI interfaces evolve from one version to another, it's strongly recommended
 not to implement this interface in client code. New methods can be added to
 this interface at any time to keep up with the JDI functionality.

Since:
2.7

Method Summary
 ClassVariable classObject()
          Returns the class object variable, that corresponds to this type in the target VM.
 ObjectVariable getClassLoader()
          Gets the classloader object which loaded the class corresponding to this type.
 long getInstanceCount()
          Retrieves the number of instances this class.
 List<ObjectVariable> getInstances(long maxInstances)
          Returns instances of this class type.
 String getSourceName()
          Get the source name of this type.
 Super getSuperClass()
          Gets the superclass of this class.
 List<Field> staticFields()
          Provide a list of static fields declared in this type.
 
Methods inherited from interface org.netbeans.api.debugger.jpda.VariableType
getName
 

Method Detail

getSourceName

String getSourceName()
                     throws com.sun.jdi.AbsentInformationException
Get the source name of this type.

Returns:
the source file name of this type.
Throws:
com.sun.jdi.AbsentInformationException

classObject

ClassVariable classObject()
Returns the class object variable, that corresponds to this type in the target VM.

Returns:
the class object variable.
Throws:
UnsupportedOperationException - when not supported by target VM.

getClassLoader

ObjectVariable getClassLoader()
Gets the classloader object which loaded the class corresponding to this type.

Returns:
an object variable representing the classloader, or null if the class was loaded through the bootstrap class loader.

getSuperClass

Super getSuperClass()
Gets the superclass of this class.

Returns:
the superclass of this class in the debuggee, or null if no such class exists.

staticFields

List<Field> staticFields()
Provide a list of static fields declared in this type.

Returns:
the list of Field objects representing static fields.

getInstanceCount

long getInstanceCount()
                      throws UnsupportedOperationException
Retrieves the number of instances this class. Use JPDADebugger.canGetInstanceInfo() to determine if this operation is supported.

Returns:
the number of instances.
Throws:
UnsupportedOperationException

getInstances

List<ObjectVariable> getInstances(long maxInstances)
                                  throws UnsupportedOperationException
Returns instances of this class type. Only instances that are reachable for the purposes of garbage collection are returned. Use JPDADebugger.canGetInstanceInfo() to determine if this operation is supported.

Parameters:
maxInstances - the maximum number of instances to return. Must be non-negative. If zero, all instances are returned.
Returns:
a List of object variables.
Throws:
UnsupportedOperationException

org.netbeans.api.debugger.jpda/2 2.31.1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.