public interface ObjectVariable extends Variable
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.
Modifier and Type | Method and Description |
---|---|
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.
|
createMirrorObject, getType, getValue
String getToStringValue() throws InvalidExpressionException
Object.toString()
in debugged JVM and returns
its value.InvalidExpressionException
- in case of execution problemsVariable 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 problemsint getFieldsCount()
Field getField(String name)
name
- a name of field to be returnedField[] getFields(int from, int to)
from
- the index of first field to be returnedto
- the index of last field, exclusivefrom
index and less then to
index.Field[] getAllStaticFields(int from, int to)
Field[] getInheritedFields(int from, int to)
List<ObjectVariable> getReferringObjects(long maxReferrers) throws UnsupportedOperationException
JPDADebugger.canGetInstanceInfo()
to determine if this operation is supported.maxReferrers
- The maximum number of referring variables to return. Must be non-negative. If zero, all referring variables are returned.UnsupportedOperationException
Super getSuper()
JPDAClassType getClassType()
long getUniqueID()