Inheritance diagram for java.lang.ref.Reference:
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. | |
Object | get () |
Return the referent of the reference object. | |
boolean | isEnqueued () |
Return whether the reference object has been enqueued. | |
Package Functions | |
boolean | enqueueImpl () |
Enqueue the reference object on the associated queue. | |
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 q) |
Implement this method to support the provided subclass implementations. | |
void | dequeue () |
Called when a Reference has been removed from its ReferenceQueue. |
|
Constructs a new instance of this class.
|
|
Make the referent null. This does not force the reference object to be enqueued. |
|
Force the reference object to be enqueued if it has been associated with a queue.
|
|
Return the referent of the reference object.
Reimplemented in java.lang.ref.PhantomReference, and java.lang.ref.SoftReference. |
|
Return whether the reference object has been enqueued.
|
|
Enqueue the reference object on the associated queue.
|
|
Implement this method to support the provided subclass implementations. Initialize a newly created reference object. Associate the reference object with the referent.
|
|
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.
|
|
Called when a Reference has been removed from its ReferenceQueue. Set the enqueued field to false. |