Package org.wildfly.common.ref
Interface Reference<T,A>
- Type Parameters:
T- the reference value typeA- the attachment type
- All Known Implementing Classes:
CleanerReference,PhantomReference,SoftReference,StrongReference,WeakReference
Deprecated, for removal: This API element is subject to removal in a future version.
An enhanced reference type with a type-safe attachment.
- Author:
- David M. Lloyd
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumDeprecated, for removal: This API element is subject to removal in a future version.A reference type. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Deprecated, for removal: This API element is subject to removal in a future version.Clear the reference.get()Deprecated, for removal: This API element is subject to removal in a future version.Get the value, ornullif the reference has been cleared.Deprecated, for removal: This API element is subject to removal in a future version.Get the attachment, if any.getType()Deprecated, for removal: This API element is subject to removal in a future version.Get the type of the reference.
-
Method Details
-
get
T get()Deprecated, for removal: This API element is subject to removal in a future version.Get the value, ornullif the reference has been cleared.- Returns:
- the value
-
getAttachment
A getAttachment()Deprecated, for removal: This API element is subject to removal in a future version.Get the attachment, if any.- Returns:
- the attachment
-
clear
void clear()Deprecated, for removal: This API element is subject to removal in a future version.Clear the reference. -
getType
Reference.Type getType()Deprecated, for removal: This API element is subject to removal in a future version.Get the type of the reference.- Returns:
- the type
-
Referenceinstead.