java.lang.ref
7 classes of the module java.base.
Load them with:
using {
"java.lang.ref"
}
Cleaner#
class final · extends Object · java.lang.ref.Cleaner
Methods
| Method | Ring call | Java overloads |
|---|---|---|
@create | @create(threadFactory) | static Cleaner create(ThreadFactory threadFactory) |
create | create() | static Cleaner create() |
register | register(obj,action) | Cleanable register(Object obj, Runnable action) |
The methods and fields of Object are inherited.
CleanerCleanable#
interface · java.lang.ref.Cleaner$Cleanable
Methods
| Method | Ring call | Java overloads |
|---|---|---|
clean | clean() | void clean() |
PhantomReference#
class · extends Reference · java.lang.ref.PhantomReference
Constructors
new PhantomReference(Object referent, ReferenceQueue q) |
Ring: new PhantomReference(args) uses the constructor with the fewest parameters (at least one); new PhantomReference makes the object with the constructor without parameters; the others: (new PhantomReference).@New([ :param = value ]) or .@New([v1,v2]).
The methods and fields of Reference are inherited.
Reference#
abstract · extends Object · java.lang.ref.Reference
Methods
| Method | Ring call | Java overloads |
|---|---|---|
@get | @get() | Object get() |
clear | clear() | void clear() |
enqueue | enqueue() | boolean enqueue() |
isEnqueued | isEnqueued() | boolean isEnqueued() |
reachabilityFence | reachabilityFence(ref) | static void reachabilityFence(Object ref) |
refersTo | refersTo(obj) | boolean refersTo(Object obj) |
The methods and fields of Object are inherited.
ReferenceQueue#
class · extends Object · java.lang.ref.ReferenceQueue
Constructors
new ReferenceQueue() |
Ring: new ReferenceQueue(args) uses the constructor with the fewest parameters (at least one); new ReferenceQueue makes the object with the constructor without parameters; the others: (new ReferenceQueue).@New([ :param = value ]) or .@New([v1,v2]).
Methods
| Method | Ring call | Java overloads |
|---|---|---|
@remove | @remove(timeout) | Reference remove(long timeout) |
poll | poll() | Reference poll() |
remove | remove() | Reference remove() |
The methods and fields of Object are inherited.
SoftReference#
class · extends Reference · java.lang.ref.SoftReference
Constructors
new SoftReference(Object referent) |
new SoftReference(Object referent, ReferenceQueue q) |
Ring: new SoftReference(args) uses the constructor with the fewest parameters (at least one); new SoftReference makes the object with the constructor without parameters; the others: (new SoftReference).@New([ :param = value ]) or .@New([v1,v2]).
The methods and fields of Reference are inherited.
WeakReference#
class · extends Reference · java.lang.ref.WeakReference
Constructors
new WeakReference(Object referent) |
new WeakReference(Object referent, ReferenceQueue q) |
Ring: new WeakReference(args) uses the constructor with the fewest parameters (at least one); new WeakReference makes the object with the constructor without parameters; the others: (new WeakReference).@New([ :param = value ]) or .@New([v1,v2]).
The methods and fields of Reference are inherited.