org.aspectbench.tm.runtime.internal
Class ClashPersistentWeakRef
java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.WeakReference
org.aspectbench.tm.runtime.internal.MyWeakRef
org.aspectbench.tm.runtime.internal.ClashWeakRef
org.aspectbench.tm.runtime.internal.ClashPersistentWeakRef
public class ClashPersistentWeakRef
- extends ClashWeakRef
Method Summary |
boolean |
equals(java.lang.Object obj)
Only one PersistentWeakRef is ever constructed for a particular object. |
java.lang.Object |
get()
Return the referent while it's alive; after it is destroyed, return this. |
static ClashWeakRef |
getWeakRef(java.lang.Object o)
|
Methods inherited from class java.lang.ref.Reference |
clear, enqueue, isEnqueued |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
ClashPersistentWeakRef
protected ClashPersistentWeakRef(java.lang.Object arg0)
ClashPersistentWeakRef
public ClashPersistentWeakRef(java.lang.Object arg0,
java.lang.ref.ReferenceQueue arg1)
getWeakRef
public static ClashWeakRef getWeakRef(java.lang.Object o)
equals
public boolean equals(java.lang.Object obj)
- Only one PersistentWeakRef is ever constructed for a particular object. Thus,
this PWR is equal to obj iff they are the same weak reference, or if obj is
the referent of this.
- Overrides:
equals
in class MyWeakRef
get
public java.lang.Object get()
- Return the referent while it's alive; after it is destroyed, return this.
TODO: Is it sound to always return 'this' instead?
- Overrides:
get
in class java.lang.ref.Reference