Interface Reference<T,A>

Type Parameters:
T - the reference value type
A - the attachment type
All Known Implementing Classes:
PhantomReference, SoftReference, StrongReference, WeakReference

@Deprecated public interface Reference<T,A>
Deprecated.
Use Cleaner or one of the reference types from a support library such as io.smallrye.common:smallrye-common-ref instead.
An enhanced reference type with a type-safe attachment.
Author:
David M. Lloyd
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Deprecated.
    A reference type.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    Clear the reference.
    get()
    Deprecated.
    Get the value, or null if the reference has been cleared.
    Deprecated.
    Get the attachment, if any.
    Deprecated.
    Get the type of the reference.
  • Method Details

    • get

      T get()
      Deprecated.
      Get the value, or null if the reference has been cleared.
      Returns:
      the value
    • getAttachment

      A getAttachment()
      Deprecated.
      Get the attachment, if any.
      Returns:
      the attachment
    • clear

      void clear()
      Deprecated.
      Clear the reference.
    • getType

      Reference.Type getType()
      Deprecated.
      Get the type of the reference.
      Returns:
      the type