1 *java.lang.ref.Reference* *Reference* Abstract base class for reference objects.
3 public abstract class Reference<T>
4 extends |java.lang.Object|
6 |java.lang.ref.Reference_Description|
7 |java.lang.ref.Reference_Fields|
8 |java.lang.ref.Reference_Constructors|
9 |java.lang.ref.Reference_Methods|
11 ================================================================================
13 *java.lang.ref.Reference_Methods*
14 |java.lang.ref.Reference.clear()|Clears this reference object.
15 |java.lang.ref.Reference.enqueue()|Adds this reference object to the queue with
16 |java.lang.ref.Reference.get()|Returns this reference object's referent.
17 |java.lang.ref.Reference.isEnqueued()|Tells whether or not this reference objec
19 *java.lang.ref.Reference_Description*
21 Abstract base class for reference objects. This class defines the operations
22 common to all reference objects. Because reference objects are implemented in
23 close cooperation with the garbage collector, this class may not be subclassed
28 *java.lang.ref.Reference.clear()*
32 Clears this reference object. Invoking this method will not cause this object
35 This method is invoked only by Java code; when the garbage collector clears
36 references it does so directly, without invoking this method.
40 *java.lang.ref.Reference.enqueue()*
42 public boolean enqueue()
44 Adds this reference object to the queue with which it is registered, if any.
46 This method is invoked only by Java code; when the garbage collector enqueues
47 references it does so directly, without invoking this method.
51 Returns: true if this reference object was successfully enqueued; false if it was
52 already enqueued or if it was not registered with a queue when it
55 *java.lang.ref.Reference.get()*
59 Returns this reference object's referent. If this reference object has been
60 cleared, either by the program or by the garbage collector, then this method
65 Returns: The object to which this reference refers, or null if this reference object has
68 *java.lang.ref.Reference.isEnqueued()*
70 public boolean isEnqueued()
72 Tells whether or not this reference object has been enqueued, either by the
73 program or by the garbage collector. If this reference object was not
74 registered with a queue when it was created, then this method will always
79 Returns: true if and only if this reference object has been enqueued