sofya.ed.semantic
Class EventListener.ObjectData

java.lang.Object
  extended by sofya.ed.semantic.EventListener.ObjectData
Enclosing interface:
EventListener

public static class EventListener.ObjectData
extends java.lang.Object

Provides information about an object on which an event occurred.


Method Summary
 void disableCollection()
          Disables garbage collection of the mirrored object.
 void enableCollection()
          Enables garbage collection of the mirrored object.
 long getId()
          Gets the unique identifier associated with the mirrored object.
 com.sun.jdi.ObjectReference getReference()
          Gets the underlying object reference (use with care, you will be exposed to changes in com.sun.jdi).
 java.lang.String getType()
          Gets the fully qualified name of the type of the mirrored object.
 boolean isArray()
          Reports whether the object is an array.
 boolean isCollected()
          Reports whether the mirrored object has been garbage collected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getId

public long getId()
Gets the unique identifier associated with the mirrored object.

This method will succeed even if the object has been garbage collected.

Returns:
A unique identifier associated with the mirrored object.

getType

public java.lang.String getType()
Gets the fully qualified name of the type of the mirrored object.

This method will succeed even if the object has been garbage collected.

Returns:
The type of the mirrored object.

isArray

public boolean isArray()
Reports whether the object is an array.

Returns:
true if the object affected by the event occurred is an array reference.

enableCollection

public void enableCollection()
Enables garbage collection of the mirrored object.

If the target virtual machine has been resumed, requests for information about the mirrored object may fail with an ObjectCollectedException after a call to this method.


disableCollection

public void disableCollection()
Disables garbage collection of the mirrored object.

Calling this method will prevent the target virtual machine from garbage collecting the mirrored object, which guarantees that an ObjectCollectedException cannot be thrown if a request for information about the object is made at a later time. However, call this method only if you are certain that you will need to request information about the mirrored object at an indeterminate time in the future, and it is possible you will not be able to obtain a reference to the object again from a future event. Indiscrimate use of this method will interfere with the behavior of the target virtual machine, and in the extreme may cause an otherwise unnecessary OutOfMemoryError.


isCollected

public boolean isCollected()
Reports whether the mirrored object has been garbage collected.

If the mirrored object has been collected, attempts to request most types of information about the object will result in an ObjectCollectedException and should be avoided.

Returns:
true if the mirrored object has been collected.

getReference

public com.sun.jdi.ObjectReference getReference()
Gets the underlying object reference (use with care, you will be exposed to changes in com.sun.jdi).

Returns:
The object reference for the object.