All Packages  Class Hierarchy  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

Method Index

 o description()
Return a description of the object.
 o finalize()
 o getClazz()
Returns the object's class.
 o getField(int)
Return an instance variable, specified by slot number.
 o getField(String)
Return an instance variable, specified by name.
 o getFields()
Return the instance (non-static) fields of an object.
 o getFieldValue(int)
Returns the value of an object's instance variable.
 o getFieldValue(String)
Returns the value of an object's instance variable.
 o getId()
Returns the id of the object.
 o setField(int, boolean)
Set a boolean instance variable, specified by slot.
 o setField(int, char)
Set a char instance variable, specified by slot.
 o setField(int, double)
Set a double instance variable, specified by slot.
 o setField(int, float)
Set a float instance variable, specified by slot.
 o setField(int, int)
Set an int instance variable, specified by slot.
 o setField(int, long)
Set a long instance variable, specified by slot.
 o setField(int, RemoteObject)
Set an object instance variable, specified by slot.
 o setField(String, boolean)
Set a boolean instance variable, specified by name.
 o setField(String, char)
Set a char instance variable, specified by name.
 o setField(String, double)
Set a double instance variable, specified by name.
 o setField(String, float)
Set a float instance variable, specified by name.
 o setField(String, int)
Set an int instance variable, specified by name.
 o setField(String, long)
Set a long instance variable, specified by name.
 o setField(String, RemoteObject)
Set an object instance variable, specified by name.
 o toString()
Return object as a string.
 o typeName()
Returns the RemoteValue's type name ("Object").

Methods

 o typeName
 public String typeName() throws Exception
Returns the RemoteValue's type name ("Object").

Throws: Exception
if a general exception occurs.
Overrides:
typeName in class RemoteValue
 o getId
 public final int getId()
Returns the id of the object.

 o getClazz
 public final RemoteClass getClazz()
Returns the object's class.

 o 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.
Throws: Exception
if a general exception occurs.
 o 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.
Throws: Exception
if a general exception occurs.
 o getFields
 public RemoteField[] getFields() throws Exception
Return the instance (non-static) fields of an object.

Throws: Exception
if a general exception occurs.
 o 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.
Throws: Exception
if a general exception occurs.
 o 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.
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o 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
Throws: Exception
if a general exception occurs.
 o description
 public String description()
Return a description of the object.

Overrides:
description in class RemoteValue
 o toString
 public String toString()
Return object as a string.

Overrides:
toString in class Object
 o finalize
 protected void finalize() throws Exception
Throws: Exception
if a general exception occurs.
Overrides:
finalize in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Submit a bug or feature