com.sun.btrace
Class BTraceUtils.References

java.lang.Object
  extended by com.sun.btrace.BTraceUtils.References
Enclosing class:
BTraceUtils

public static class BTraceUtils.References
extends java.lang.Object


Constructor Summary
BTraceUtils.References()
           
 
Method Summary
static java.lang.Object deref(java.lang.ref.Reference ref)
          Returns the given reference object's referent.
static java.lang.ref.SoftReference softRef(java.lang.Object obj)
          Creates and returns a soft reference to the given object.
static java.lang.ref.WeakReference weakRef(java.lang.Object obj)
          Creates and returns a weak reference to the given object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BTraceUtils.References

public BTraceUtils.References()
Method Detail

weakRef

public static java.lang.ref.WeakReference weakRef(java.lang.Object obj)
Creates and returns a weak reference to the given object.

Parameters:
obj - object for which a weak reference is created.
Returns:
a weak reference to the given object.

softRef

public static java.lang.ref.SoftReference softRef(java.lang.Object obj)
Creates and returns a soft reference to the given object.

Parameters:
obj - object for which a soft reference is created.
Returns:
a soft reference to the given object.

deref

public static java.lang.Object deref(java.lang.ref.Reference ref)
Returns the given reference object's referent. If the reference object has been cleared, either by the program or by the garbage collector, then this method returns null.

Parameters:
ref - reference object whose referent is returned.
Returns:
The object to which the reference refers, or null if the reference object has been cleared.