| java.lang.Object java.lang.ref.Reference java.lang.ref.WeakReference
All known Subclasses: com.sun.xlet.ixc.RegistryKey,
WeakReference | public class WeakReference extends Reference (Code) | | This class provides support for weak references. Weak references
are most often used to implement canonicalizing mappings.
Suppose that the garbage collector determines at a certain
point in time that an object is weakly reachable. At that
time it will atomically clear all the weak references to
that object and all weak references to any other weakly-
reachable objects from which that object is reachable
through a chain of strong and weak references.
version: 12/19/01 (CLDC 1.1) since: JDK1.2, CLDC 1.1 |
Constructor Summary | |
public | WeakReference(Object referent) Creates a new weak reference that refers to the given object. |
Method Summary | |
native public void | clear() Clears this reference object. | native public Object | get() Returns this reference object's referent. |
WeakReference | public WeakReference(Object referent)(Code) | | Creates a new weak reference that refers to the given object.
|
clear | native public void clear()(Code) | | Clears this reference object.
|
get | native public Object get()(Code) | | 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 .
The object to which this reference refers, ornull if this reference object has been cleared |
|
|