站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

ObjectVariable (JPDA Debugger API) - NetBeans API Javadoc (Current Development Version)

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

org.netbeans.api.debugger.jpda
Interface ObjectVariable

All Superinterfaces:
Variable
All Known Subinterfaces:
ClassVariable, ReturnVariable, Super, This

public interface ObjectVariable
extends Variable

Represents instance of some object in debugged JVM. This interface can be optionally inplemented by a implementation of LocalVariable or Field interfaces.

 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.

See Also:
LocalVariable, Field, This, Super, JPDAThread.getContendedMonitor(), JPDAThread.getOwnedMonitors()

Method Summary
 Field[] getAllStaticFields(int from, int to)
          Return all static fields.
 JPDAClassType getClassType()
          Get the run-time class type of this object variable.
 Field getField(String name)
          Returns field defined in this object.
 Field[] getFields(int from, int to)
          Returns non static fields defined in this object.
 int getFieldsCount()
          Number of fields defined in this object.
 Field[] getInheritedFields(int from, int to)
          Return all inherited fields.
 List<ObjectVariable> getReferringObjects(long maxReferrers)
          Returns variables that directly reference this variable.
 Super getSuper()
          Returns representation of super class of this object.
 String getToStringValue()
          Calls Object.toString() in debugged JVM and returns its value.
 long getUniqueID()
          Returns a unique identifier for this object variable.
 Variable invokeMethod(String methodName, String signature, Variable[] arguments)
          Calls given method in debugged JVM on this instance and returns its value.
 
Methods inherited from interface org.netbeans.api.debugger.jpda.Variable
getType, getValue
 

Method Detail

getToStringValue

String getToStringValue()
                        throws InvalidExpressionException
Calls Object.toString() in debugged JVM and returns its value.

Returns:
toString () value of this instance
Throws:
InvalidExpressionException

invokeMethod

Variable invokeMethod(String methodName,
                      String signature,
                      Variable[] arguments)
                      throws NoSuchMethodException,
                             InvalidExpressionException
Calls given method in debugged JVM on this instance and returns its value.

Parameters:
methodName - a name of method to be called
signature - a signature of method to be called
arguments - a arguments to be used
Returns:
value of given method call on this instance
Throws:
NoSuchMethodException
InvalidExpressionException

getFieldsCount

int getFieldsCount()
Number of fields defined in this object.

Returns:
number of fields defined in this object

getField

Field getField(String name)
Returns field defined in this object.

Parameters:
name - a name of field to be returned
Returns:
field defined in this object

getFields

Field[] getFields(int from,
                  int to)
Returns non static fields defined in this object.

Parameters:
from - the index of first field to be returned
to - the index of last field, exclusive
Returns:
fields defined in this object that are greater then or equal to from index and less then to index.

getAllStaticFields

Field[] getAllStaticFields(int from,
                           int to)
Return all static fields.

Returns:
all static fields

getInheritedFields

Field[] getInheritedFields(int from,
                           int to)
Return all inherited fields.

Returns:
all inherited fields

getReferringObjects

List<ObjectVariable> getReferringObjects(long maxReferrers)
                                         throws UnsupportedOperationException
Returns variables that directly reference this variable. Use JPDADebugger.canGetInstanceInfo() to determine if this operation is supported.

Parameters:
maxReferrers - The maximum number of referring variables to return. Must be non-negative. If zero, all referring variables are returned.
Returns:
A list of referring variables.
Throws:
UnsupportedOperationException

getSuper

Super getSuper()
Returns representation of super class of this object.

Returns:
representation of super class of this object

getClassType

JPDAClassType getClassType()
Get the run-time class type of this object variable.

Returns:
The variable class type.

getUniqueID

long getUniqueID()
Returns a unique identifier for this object variable. It is guaranteed to be unique among all object variables from the same debuggee that have not yet been disposed.

Returns:
a long unique ID

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

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.