|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ref.Reference<T>
public abstract class Reference<T>
Reference is the common abstract super class for reference types WeakReference, SoftReference and PhantomReference.
This class may not be extended by user defined classes.
| Method Summary | |
|---|---|
void |
clear()
Clear this reference, i.e., ensure that get() returns null. |
boolean |
enqueue()
Enqueues this Reference on its associated ReferenceQueue. |
protected void |
finalize()
finalize method. |
T |
get()
Return the value of this reference if it is still alive, or null if it was deleted. |
boolean |
isEnqueued()
Test if this reference has been enqueued to its reference queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public T get()
public void clear()
This method does not enqueue this reference.
public boolean isEnqueued()
public boolean enqueue()
For JamaicaVM, this method synchronized on the reference queue attached to this object for atomicity.
protected void finalize()
throws Throwable
finalize in class ObjectThrowable - this method may throw any exception, it will be
ignored by the finalizer thread or by Runtime.runFinalization.
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||