Android
java.lang.ref
public class

java.lang.ref.PhantomReference<T>

java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.PhantomReference<T>

Implements a phantom reference, which is the weakest of the three types of references. Once the garbage collector decides that an object obj is finalize() method.

Summary

Public Constructors

            PhantomReference(T r, ReferenceQueue<? super T> q)
Constructs a new phantom reference and registers it with the given reference queue.

Public Methods

          get()
Returns null.
Methods inherited from class java.lang.ref.Reference
Methods inherited from class java.lang.Object

Details

Public Constructors

public PhantomReference(T r, ReferenceQueue<? super T> q)

Constructs a new phantom reference and registers it with the given reference queue. The reference queue may be null, but this case does not make any sense, since the reference will never be enqueued, and the get() method always returns null.

Parameters

r the referent to track
q the queue to register the phantom reference object with

Public Methods

public T get()

Returns null. The referent of a phantom reference is not accessible.

Returns

  • null (always)
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56