public interface JPDAClassType extends VariableType
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.
Modifier and Type | Method and Description |
---|---|
ClassVariable |
classObject()
Returns the class object variable, that corresponds to this type in the target VM.
|
List<JPDAClassType> |
getAllInterfaces()
Get all interfaces that are directly or indirectly implemented by this class,
or extended by this interface.
|
ObjectVariable |
getClassLoader()
Gets the classloader object which loaded the class corresponding to this type.
|
List<JPDAClassType> |
getDirectInterfaces()
Get the interfaces that are directly implemented by this class,
or directly extended by this interface.
|
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.
|
List<JPDAClassType> |
getSubClasses()
Get the currently loaded subclasses, when this type represents a class,
or loaded subinterfaces and implementors of this interface, if this type
represents an interface.
|
Super |
getSuperClass()
Gets the superclass of this class.
|
Variable |
invokeMethod(String methodName,
String signature,
Variable[] arguments)
Calls given static method in debugged JVM on this class and returns
its value.
|
boolean |
isInstanceOf(String className)
Check if this type in an instance of a given class name.
|
List<Field> |
staticFields()
Provide a list of static fields declared in this type.
|
getName
String getSourceName() throws com.sun.jdi.AbsentInformationException
com.sun.jdi.AbsentInformationException
ClassVariable classObject()
UnsupportedOperationException
- when not supported by target VM.ObjectVariable getClassLoader()
null
if the class was loaded through the bootstrap class loader.Super getSuperClass()
null
if no such class exists.List<JPDAClassType> getSubClasses()
List<JPDAClassType> getAllInterfaces()
List<JPDAClassType> getDirectInterfaces()
boolean isInstanceOf(String className)
className
- the class nametrue
when this type is an instance of the given class
name, false
otherwise.List<Field> staticFields()
Field
objects
representing static fields.Variable invokeMethod(String methodName, String signature, Variable[] arguments) throws NoSuchMethodException, InvalidExpressionException
methodName
- a name of method to be calledsignature
- a signature of method to be calledarguments
- arguments to be usedNoSuchMethodException
- when the method does not existInvalidExpressionException
- in case of execution problemslong getInstanceCount() throws UnsupportedOperationException
JPDADebugger.canGetInstanceInfo()
to determine if this operation is supported.UnsupportedOperationException
List<ObjectVariable> getInstances(long maxInstances) throws UnsupportedOperationException
JPDADebugger.canGetInstanceInfo()
to determine if this operation is supported.maxInstances
- the maximum number of instances to return. Must be non-negative. If zero, all instances are returned.UnsupportedOperationException