public abstract class Reference<T> extends Object
public T get()
null
。
null
如果此引用对象已被清除
public void clear()
此方法仅由Java代码调用; 当垃圾收集器清除引用时,它直接执行,而不调用此方法。
public boolean isEnqueued()
false
。
true
当且仅当该引用对象已被入队时
public boolean enqueue()
此方法仅由Java代码调用; 当垃圾回收器排队引用时,它直接执行,而不调用此方法。
true
如果此引用对象成功排队;
false
如果它已经入队,或者如果它没有在创建队列时注册
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.