Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.squawk.debugger.sda
Class ObjectManager

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

    public class ObjectManager

extends Object

This class manages mapping objects in the VM to JDWP `objectID`s. 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
`Klass` | `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

### 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

### getThreadForID

    public VMThread getThreadForID(DataType.ObjectID objectID)
                            throws SDWPException

  Throws:
    `SDWPException`

### getStringForID

    public String getStringForID(DataType.ObjectID objectID)
                          throws SDWPException

  Throws:
    `SDWPException`

### getClassForID

    public Klass getClassForID(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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"