Packages This Package Previous Next Index
Class sun.tools.debug.RemoteObject
java.lang.Object
|
+----sun.tools.debug.RemoteValue
|
+----sun.tools.debug.RemoteObject
- public class RemoteObject
- extends RemoteValue
The RemoteObject class allows access to an object in a remote
Java interpreter.
Remote objects are not created by the local debugger, but are returned
by the remote debugging agent when queried for the values of instance
or static variables of known objects (such as classes), or from local
(stack) variables.
Each remote object has a reference cached by the remote Java interpreter,
so that the object will not be garbage-collected during examination. The
RemoteDebugger's gc() operation frees references to objects that are no
longer being examined.
- See Also:
- RemoteDebugger, RemoteClass, RemoteString, RemoteThread, RemoteThreadGroup
-
description()
- Return a description of the object.
-
finalize()
- Code to perform when this object is garbage collected.
-
getClazz()
- Returns the object's class.
-
getField(int)
- Return an instance variable, specified by slot number.
-
getField(String)
- Return an instance variable, specified by name.
-
getFields()
- Return the instance (non-static) fields of an object.
-
getFieldValue(int)
- Returns the value of an object's instance variable.
-
getFieldValue(String)
- Returns the value of an object's instance variable.
-
getId()
- Returns the id of the object.
-
setField(int, boolean)
- Set a boolean instance variable, specified by slot.
-
setField(int, char)
- Set a char instance variable, specified by slot.
-
setField(int, double)
- Set a double instance variable, specified by slot.
-
setField(int, float)
- Set a float instance variable, specified by slot.
-
setField(int, int)
- Set an int instance variable, specified by slot.
-
setField(int, long)
- Set a long instance variable, specified by slot.
-
setField(int, RemoteObject)
- Set an object instance variable, specified by slot.
-
setField(String, boolean)
- Set a boolean instance variable, specified by name.
-
setField(String, char)
- Set a char instance variable, specified by name.
-
setField(String, double)
- Set a double instance variable, specified by name.
-
setField(String, float)
- Set a float instance variable, specified by name.
-
setField(String, int)
- Set an int instance variable, specified by name.
-
setField(String, long)
- Set a long instance variable, specified by name.
-
setField(String, RemoteObject)
- Set an object instance variable, specified by name.
-
toString()
- Return object as a string.
-
typeName()
- Returns the RemoteValue's type name ("Object").
typeName
public String typeName() throws Exception
- Returns the RemoteValue's type name ("Object").
- Overrides:
- typeName in class RemoteValue
getId
public final int getId()
- Returns the id of the object.
getClazz
public final RemoteClass getClazz()
- Returns the object's class.
getFieldValue
public RemoteValue getFieldValue(int n) throws Exception
- Returns the value of an object's instance variable.
- Parameters:
- n - the slot number of the variable to be returned.
getFieldValue
public RemoteValue getFieldValue(String name) throws Exception
- Returns the value of an object's instance variable.
- Parameters:
- name - the name of the instance variable
- Returns:
- the variable as a RemoteValue, or null if name not found.
getFields
public RemoteField[] getFields() throws Exception
- Return the instance (non-static) fields of an object.
getField
public RemoteField getField(int n) throws Exception
- Return an instance variable, specified by slot number.
- Parameters:
- n - the slot number of the variable to be returned.
getField
public RemoteField getField(String name) throws Exception
- Return an instance variable, specified by name.
- Parameters:
- name - the name of the instance variable
- Returns:
- the variable as a RemoteField, or null if name not found.
setField
public void setField(String name,
boolean value) throws Exception
- Set a boolean instance variable, specified by name. If the instance
variable doesn't exist, an IllegalAccessException is thrown.
- Parameters:
- name - the name of the instance variable
- value - the value to use
setField
public void setField(String name,
int value) throws Exception
- Set an int instance variable, specified by name. If the instance
variable doesn't exist, an IllegalAccessException is thrown.
- Parameters:
- name - the name of the instance variable
- value - the value to use
setField
public void setField(String name,
char value) throws Exception
- Set a char instance variable, specified by name. If the instance
variable doesn't exist, an IllegalAccessException is thrown.
- Parameters:
- name - the name of the instance variable
- value - the value to use
setField
public void setField(String name,
long value) throws Exception
- Set a long instance variable, specified by name. If the instance
variable doesn't exist, an IllegalAccessException is thrown.
- Parameters:
- name - the name of the instance variable
- value - the value to use
setField
public void setField(String name,
float value) throws Exception
- Set a float instance variable, specified by name. If the instance
variable doesn't exist, an IllegalAccessException is thrown.
- Parameters:
- name - the name of the instance variable
- value - the value to use
setField
public void setField(String name,
double value) throws Exception
- Set a double instance variable, specified by name. If the instance
variable doesn't exist, an IllegalAccessException is thrown.
- Parameters:
- name - the name of the instance variable
- value - the value to use
setField
public void setField(String name,
RemoteObject object) throws Exception
- Set an object instance variable, specified by name. This isn't
currently supported, so an IllegalAccessException is always thrown.
(The API is defined so that this feature can be implemented in
future releases.)
- Parameters:
- name - the name of the instance variable
- object - the RemoteObject to use
setField
public void setField(int slot,
boolean value) throws Exception
- Set a boolean instance variable, specified by slot. If the instance
variable doesn't exist, an IllegalAccessException is thrown.
- Parameters:
- slot - the slot number of the instance variable
- value - the value to use
setField
public void setField(int slot,
int value) throws Exception
- Set an int instance variable, specified by slot. If the instance
variable doesn't exist, an IllegalAccessException is thrown.
- Parameters:
- slot - the slot number of the instance variable
- value - the value to use
setField
public void setField(int slot,
char value) throws Exception
- Set a char instance variable, specified by slot. If the instance
variable doesn't exist, an IllegalAccessException is thrown.
- Parameters:
- slot - the slot number of the instance variable
- value - the value to use
setField
public void setField(int slot,
long value) throws Exception
- Set a long instance variable, specified by slot. If the instance
variable doesn't exist, an IllegalAccessException is thrown.
- Parameters:
- slot - the slot number of the instance variable
- value - the value to use
setField
public void setField(int slot,
float value) throws Exception
- Set a float instance variable, specified by slot. If the instance
variable doesn't exist, an IllegalAccessException is thrown.
- Parameters:
- slot - the slot number of the instance variable
- value - the value to use
setField
public void setField(int slot,
double value) throws Exception
- Set a double instance variable, specified by slot. If the instance
variable doesn't exist, an IllegalAccessException is thrown.
- Parameters:
- slot - the slot number of the instance variable
- value - the value to use
setField
public void setField(int slot,
RemoteObject object) throws Exception
- Set an object instance variable, specified by slot. This isn't
currently supported, so an IllegalAccessException is always thrown.
(The API is defined so that this feature can be implemented in
future releases.)
- Parameters:
- slot - the slot number of the instance variable
- object - the RemoteObject to use
description
public String description()
- Return a description of the object.
- Overrides:
- description in class RemoteValue
toString
public String toString()
- Return object as a string.
- Overrides:
- toString in class Object
finalize
protected void finalize() throws Exception
- Code to perform when this object is garbage collected.
- Overrides:
- finalize in class Object
Packages This Package Previous Next Index