2010 FRC Java API


com.sun.squawk.debugger.sda
Class ObjectManager

java.lang.Object
  extended by com.sun.squawk.debugger.sda.ObjectManager

public class ObjectManager
extends Object

This class manages mapping objects in the VM to JDWP objectIDs. This includes the JDWP types: objectID, tagged-objectID, threadID, threadGroupID, stringID, classObjectID, arrayID. It does NOT include referenceTypeID (and subtypes classID, arrayTypeID, interfaceID), methodID, or fieldID.


Constructor Summary
ObjectManager()
           
 
Method Summary
 Class getClassForID(DataType.ObjectID objectID)
           
 DataType.ObjectID getIDForObject(Object object)
          Gets a JDWP objectID for an object.
 Object getObjectForID(DataType.ObjectID objectID)
          Gets the object corresponding to a given JDWP objectID value.
 String getStringForID(DataType.ObjectID objectID)
           
 VMThread getThreadForID(DataType.ObjectID objectID)
           
 void writeTaggedObject(PacketOutputStream out, Object object, String s)
          Writes the JDWP tag and object ID of an object to a given packet stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectManager

public ObjectManager()
Method Detail

getClassForID

public Class getClassForID(DataType.ObjectID objectID)
                    throws SDWPException
Throws:
SDWPException

getIDForObject

public DataType.ObjectID getIDForObject(Object object)
Gets a JDWP objectID for an object.

Parameters:
object - the object to get an identifier for
Returns:
an identifier for object

getObjectForID

public Object getObjectForID(DataType.ObjectID objectID)
                      throws SDWPException
Gets the object corresponding to a given JDWP objectID value.

Parameters:
objectID - the identifier denoting an object
Returns:
the object corresponding to id or null if the object has been garbage collected
Throws:
SDWPException - if objectID does not denote a null object but the object it does denote has been garbage collected

getStringForID

public String getStringForID(DataType.ObjectID objectID)
                      throws SDWPException
Throws:
SDWPException

getThreadForID

public VMThread getThreadForID(DataType.ObjectID objectID)
                        throws SDWPException
Throws:
SDWPException

writeTaggedObject

public void writeTaggedObject(PacketOutputStream out,
                              Object object,
                              String s)
                       throws IOException
Writes the JDWP tag and object ID of an object to a given packet stream.

Parameters:
out - the stream to write to
object - the object to write
s - prefix to use if this write is logged. A value of null prevents logging altogether.
Throws:
IOException

2010 FRC Java API


Copyright © 2006-2009 Sun Microsystems, Inc. All Rights Reserved.