org.aspectbench.tm.runtime.internal
Class ClashPersistentWeakRef

java.lang.Object
  extended by java.lang.ref.Reference<T>
      extended by java.lang.ref.WeakReference
          extended by org.aspectbench.tm.runtime.internal.MyWeakRef
              extended by org.aspectbench.tm.runtime.internal.ClashWeakRef
                  extended by org.aspectbench.tm.runtime.internal.ClashPersistentWeakRef

public class ClashPersistentWeakRef
extends ClashWeakRef


Field Summary
 
Fields inherited from class org.aspectbench.tm.runtime.internal.MyWeakRef
expiredQueue
 
Constructor Summary
protected ClashPersistentWeakRef(java.lang.Object arg0)
           
  ClashPersistentWeakRef(java.lang.Object arg0, java.lang.ref.ReferenceQueue arg1)
           
 
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 org.aspectbench.tm.runtime.internal.ClashWeakRef
hashCode
 
Methods inherited from class org.aspectbench.tm.runtime.internal.MyWeakRef
addContainer, checkExpired, cleanup, isExpired, notifyContainers, removeContainer
 
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
 

Constructor Detail

ClashPersistentWeakRef

protected ClashPersistentWeakRef(java.lang.Object arg0)

ClashPersistentWeakRef

public ClashPersistentWeakRef(java.lang.Object arg0,
                              java.lang.ref.ReferenceQueue arg1)
Method Detail

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