Package org.jboss.modules.ref
Class WeakReference<T,A>
java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.WeakReference<T>
org.jboss.modules.ref.WeakReference<T,A>
- Type Parameters:
T
- the reference value typeA
- the attachment type
A reapable weak reference with an attachment. If a
Reaper
is given, then it will be used to asynchronously
clean up the referent.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.modules.ref.Reference
Reference.Type
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWeakReference
(T referent) WeakReference
(T referent, A attachment) WeakReference
(T referent, A attachment, ReferenceQueue<? super T> q) -
Method Summary
Methods inherited from class java.lang.ref.Reference
clear, clone, enqueue, get, isEnqueued, reachabilityFence, refersTo
-
Field Details
-
attachment
-
reaper
-
-
Constructor Details
-
WeakReference
-
WeakReference
-
WeakReference
-
WeakReference
-
-
Method Details
-
getAttachment
Description copied from interface:Reference
Get the attachment, if any.- Specified by:
getAttachment
in interfaceReference<T,
A> - Returns:
- the attachment
-
getType
Description copied from interface:Reference
Get the type of the reference. -
getReaper
Description copied from interface:Reapable
Get the associated reaper. -
toString
-