|
Préférences
Moteurs de recherche
|
||||||||||||
JavaTM 2 Platform Std. Ed. v1.6.0
java.lang.ref
|
Method Summary | |
---|---|
void |
clear()
Clears this reference object. |
boolean |
enqueue()
Adds this reference object to the queue with which it is registered, if any. |
T |
get()
Returns this reference object's referent. |
boolean |
isEnqueued()
Tells whether or not this reference object has been enqueued, either by the program or by the garbage collector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public T get()
null
.
null
if this reference object has been clearedpublic void clear()
This method is invoked only by Java code; when the garbage collector clears references it does so directly, without invoking this method.
public boolean isEnqueued()
false
.
true
if and only if this reference object has
been enqueuedpublic boolean enqueue()
This method is invoked only by Java code; when the garbage collector enqueues references it does so directly, without invoking this method.
true
if this reference object was successfully
enqueued; false
if it was already enqueued or if
it was not registered with a queue when it was created