T
- the reference value typeA
- the attachment typeReference<T,A>
public class PhantomReference<T,A> extends java.lang.ref.PhantomReference<T> implements Reference<T,A>
Reaper
is given, then it will be used to asynchronously
clean up the referent.PhantomReference
Reference.Type
Constructor | Description |
---|---|
PhantomReference(T referent,
A attachment,
java.lang.ref.ReferenceQueue<? super T> q) |
|
PhantomReference(T referent,
A attachment,
Reaper<T,A> reaper) |
Modifier and Type | Method | Description |
---|---|---|
A |
getAttachment() |
Get the attachment, if any.
|
Reaper<T,A> |
getReaper() |
|
Reference.Type |
getType() |
Get the type of the reference.
|
java.lang.String |
toString() |
public PhantomReference(T referent, A attachment, java.lang.ref.ReferenceQueue<? super T> q)
public A getAttachment()
Reference
getAttachment
in interface Reference<T,A>
public Reference.Type getType()
Reference
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2022 JBoss by Red Hat. All rights reserved.