public abstract class Reference<T> extends Object
|Modifier and Type||Method and Description|
Clears this reference object.
Adds this reference object to the queue with which it is registered, if any.
Returns this reference object's referent.
Tells whether or not this reference object has been enqueued, either by the program or by the garbage collector.
public T get()
null. JamaicaVM: implements this as native function to perform required synchronization with GC. JamaicaVM: Instances of Reference that are eligible for finalization whose referent is also eligible for finalization may get cleared by JamaicaVM without being enqueued. This ensures that weak or soft references that have a
Object.finalize()method or are reachable from an object that has a
Object.finalize()method will not prevent the GC from reclaiming the referent's memory.
nullif this reference object has been cleared
public void clear()
This method is invoked only by Java code; when the garbage collector clears references it does so directly, without invoking this method.
public boolean isEnqueued()
trueif and only if this reference object has been enqueued
public boolean enqueue()
This method is invoked only by Java code; when the garbage collector enqueues references it does so directly, without invoking this method.
trueif this reference object was successfully enqueued;
falseif it was already enqueued or if it was not registered with a queue when it was created
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2021 aicas GmbH. All Rights Reserved.