API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang.ref. WeakReference View Source
Author(s)
Mark Reinhold
Since
1.2
Version
1.19, 11/17/05
Serial
Hierarchy
 Object
      Reference
          WeakReference
Implements
Subclasses
Description
public class WeakReference
  Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed.
See also:   
Constructors
public WeakReference ( T referent)
  Creates a new weak reference that refers to the given object.
public WeakReference ( T referent, ReferenceQueue<Object> q)
  Creates a new weak reference that refers to the given object and is registered with the given queue.
Methods
Hide/Show inherited methods
public void clear () [Inherited From Reference]
  Clears this reference object.
public boolean enqueue () [Inherited From Reference]
  Adds this reference object to the queue with which it is registered, if any.
public T get () [Inherited From Reference]
  Returns this reference object's referent.
public boolean isEnqueued () [Inherited From Reference]
  Tells whether or not this reference object has been enqueued, either by the program or by the garbage collector.
Fields
Hide/Show inherited fields
pack-private Reference next [Inherited From Reference]
pack-private ReferenceQueue<Object> queue [Inherited From Reference]
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar