Module java.base
Package java.lang.ref

Class Reference<T>

java.lang.Object
java.lang.ref.Reference<T>
Type Parameters:
T - the type of the referent
Direct Known Subclasses:
PhantomReference, SoftReference, WeakReference

public abstract sealed class Reference<T> extends Object permits PhantomReference<T>, SoftReference<T>, WeakReference<T> (not exhaustive)
Abstract base class for reference objects. This class defines the operations common to all reference objects. Because reference objects are implemented in close cooperation with the garbage collector, this class may not be subclassed directly.
Sealed Class Hierarchy Graph:
Sealed class hierarchy graph for ReferenceSealed class hierarchy graph for Reference
Since:
1.2