Top Description Fields Constructors Methods
java.lang.ref

pack-priv sealed Class FinalReference<T>

extends Reference<T>
permits Finalizer
Class Inheritance
Known Direct Subclasses
java.lang.ref.Finalizer

Final references, used to implement finalization

Field Summary

Inherited from java.lang.ref.Reference:
nextqueue

Constructor Summary

AccessConstructor and Description
public
FinalReference(T referent, ReferenceQueue<? super T> q)

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Overrides java.lang.ref.Reference.clear.

Clears this reference object.

public boolean
enqueue()

Overrides java.lang.ref.Reference.enqueue.

Clears this reference object and adds it to the queue with which it is registered, if any.

public T
get()

Overrides java.lang.ref.Reference.get.

Returns this reference object's referent.

Inherited from java.lang.ref.Reference:
clearInactiveFinalReferenceclonegetFromInactiveFinalReferenceisEnqueuedreachabilityFencerefersTorefersToImplstartReferenceHandlerThread

Constructor Detail

FinalReferenceback to summary
public FinalReference(T referent, ReferenceQueue<? super T> q)

Method Detail

clearback to summary
public void clear()

Overrides java.lang.ref.Reference.clear.

Doc from java.lang.ref.Reference.clear.

Clears this reference object. Invoking this method will not cause this object to be enqueued.

This method is invoked only by Java code; when the garbage collector clears references it does so directly, without invoking this method.

Annotations
@Override
enqueueback to summary
public boolean enqueue()

Overrides java.lang.ref.Reference.enqueue.

Doc from java.lang.ref.Reference.enqueue.

Clears this reference object and adds it to the queue with which it is registered, if any.

This method is invoked only by Java code; when the garbage collector enqueues references it does so directly, without invoking this method.

Returns:boolean

true if this reference object was successfully enqueued; false if it was already enqueued or if it was not registered with a queue when it was created

Annotations
@Override
getback to summary
public T get()

Overrides java.lang.ref.Reference.get.

Doc from java.lang.ref.Reference.get.

Returns this reference object's referent. If this reference object has been cleared, either by the program or by the garbage collector, then this method returns null.

Returns:T

The object to which this reference refers, or null if this reference object has been cleared

Annotations
@Override