The documented methods must be implemented to support the provided subclass implementations. As the provided subclass implementations are trivial and simply call initReference(Object) and initReference(Object, ReferenceQueue) from their constructors, the vm vendor may elect to implement the subclasses as well. Abstract class which describes behavior common to all reference objects.
Public Member Functions | |
void | clear () |
Make the referent null. | |
boolean | enqueue () |
Force the reference object to be enqueued if it has been associated with a queue. | |
T | get () |
Return the referent of the reference object. | |
boolean | isEnqueued () |
Return whether the reference object has been enqueued. | |
Package Functions | |
Reference () | |
Constructs a new instance of this class. | |
void | initReference (Object r) |
Implement this method to support the provided subclass implementations. | |
void | initReference (Object r, ReferenceQueue<?super T > q) |
Implement this method to support the provided subclass implementations. | |
boolean | enqueueImpl () |
Enqueue the reference object on the associated queue. | |
void | dequeue () |
Called when a Reference has been removed from its ReferenceQueue. |
java.lang.ref.Reference< T >.Reference | ( | ) | [package] |
Constructs a new instance of this class.
void java.lang.ref.Reference< T >.clear | ( | ) |
Make the referent null.
This does not force the reference object to be enqueued.
boolean java.lang.ref.Reference< T >.enqueue | ( | ) |
Force the reference object to be enqueued if it has been associated with a queue.
T java.lang.ref.Reference< T >.get | ( | ) |
Return the referent of the reference object.
Reimplemented in java.lang.ref.PhantomReference< T >, and java.lang.ref.SoftReference< T >.
boolean java.lang.ref.Reference< T >.isEnqueued | ( | ) |
Return whether the reference object has been enqueued.
void java.lang.ref.Reference< T >.initReference | ( | Object | r | ) | [package] |
Implement this method to support the provided subclass implementations.
Initialize a newly created reference object. Associate the reference object with the referent.
r | the referent |
void java.lang.ref.Reference< T >.initReference | ( | Object | r, | |
ReferenceQueue<?super T > | q | |||
) | [package] |
Implement this method to support the provided subclass implementations.
Initialize a newly created reference object. Associate the reference object with the referent, and the specified ReferenceQueue.
r | the referent | |
q | the ReferenceQueue |
boolean java.lang.ref.Reference< T >.enqueueImpl | ( | ) | [package] |
Enqueue the reference object on the associated queue.
void java.lang.ref.Reference< T >.dequeue | ( | ) | [package] |
Called when a Reference has been removed from its ReferenceQueue.
Set the enqueued field to false.
Genereated on Tue Dec 9 14:09:48 2008 by Doxygen.
(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.