org.apache.tools.ant.util

Class WeakishReference

public abstract class WeakishReference extends Object

this is a weak reference on java1.2 and up, a hard reference on java1.1

Since: ant1.6

Nested Class Summary
static classWeakishReference.HardReference
A hard reference for Java 1.1
Method Summary
static WeakishReferencecreateReference(Object object)
create the appropriate type of reference for the java version
abstract Objectget()
Returns this reference object's referent.

Method Detail

createReference

public static WeakishReference createReference(Object object)
create the appropriate type of reference for the java version

Parameters: object

Returns: reference to the Object.

get

public abstract Object get()
Returns this reference object's referent. If this reference object has been cleared, then this method returns null.

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

Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.