public abstract class AutomaticReference<T> extends PhantomReference<T>
| Modifier | Constructor and Description | 
|---|---|
| protected  | AutomaticReference(T referent,
                  Object permit)Construct a new instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | clear()Not supported. | 
| boolean | enqueue()Not supported. | 
| protected abstract void | free()Free this reference. | 
| T | get()Always returns  null. | 
| static Object | getPermit()Get the security authorization permit to create automatic references. | 
| boolean | isEnqueued()Determine whether this reference has been enqueued by the garbage collector. | 
protected AutomaticReference(T referent, Object permit)
permit which was passed in.referent - the object to monitorpermit - the permit object originally acquired from getPermit()public static Object getPermit()
SecurityException - if a security manager is enabled and the caller does not have the createAutomaticReference RuntimePermissionpublic final T get()
null.get in class PhantomReference<T>nullpublic final void clear()
clear in class Reference<T>UnsupportedOperationException - alwayspublic final boolean isEnqueued()
isEnqueued in class Reference<T>true if the reference has been enqueued, false otherwisepublic final boolean enqueue()
enqueue in class Reference<T>UnsupportedOperationException - alwaysprotected abstract void free()
Copyright © 2016 JBoss by Red Hat. All rights reserved.