public final class References extends Object
| Modifier and Type | Method | Description | 
|---|---|---|
static <T,A> Reference<T,A> | 
create(Reference.Type type,
      T value,
      A attachment) | 
 Create a reference of a given type with the provided value and attachment. 
 | 
static <T,A> Reference<T,A> | 
create(Reference.Type type,
      T value,
      A attachment,
      ReferenceQueue<? super T> referenceQueue) | 
 Create a reference of a given type with the provided value and attachment. 
 | 
static <T,A> Reference<T,A> | 
create(Reference.Type type,
      T value,
      A attachment,
      Reaper<T,A> reaper) | 
 Create a reference of a given type with the provided value and attachment. 
 | 
static <T,A> Reference<T,A> | 
getNullReference() | 
 Get a null reference. 
 | 
public static <T,A> Reference<T,A> create(Reference.Type type, T value, A attachment, Reaper<T,A> reaper)
Reference.Type.STRONG or Reference.Type.NULL then the reaper argument is ignored.  If
 the reference type is Reference.Type.NULL then the value and attachment arguments are ignored.T - the reference value typeA - the reference attachment typetype - the reference typevalue - the reference valueattachment - the attachment valuereaper - the reaper to use, if anypublic static <T,A> Reference<T,A> create(Reference.Type type, T value, A attachment, ReferenceQueue<? super T> referenceQueue)
Reference.Type.STRONG or Reference.Type.NULL then the reference queue argument is ignored.  If
 the reference type is Reference.Type.NULL then the value and attachment arguments are ignored.T - the reference value typeA - the reference attachment typetype - the reference typevalue - the reference valueattachment - the attachment valuereferenceQueue - the reference queue to use, if anypublic static <T,A> Reference<T,A> create(Reference.Type type, T value, A attachment) throws IllegalArgumentException
Reference.Type.PHANTOM then this method will throw an IllegalArgumentException because
 such references are not constructable without a queue or reaper.  If the reference type is
 Reference.Type.NULL then the value and attachment arguments are ignored.T - the reference value typeA - the reference attachment typetype - the reference typevalue - the reference valueattachment - the attachment valueIllegalArgumentException - if the reference type is Reference.Type.PHANTOMpublic static <T,A> Reference<T,A> getNullReference()
T - the reference value typeA - the attachment value typeCopyright © 2022 JBoss by Red Hat. All rights reserved.