org.apache.tools.ant.util
Class WeakishReference

java.lang.Object
  |
  +--org.apache.tools.ant.util.WeakishReference
Direct Known Subclasses:
WeakishReference.HardReference, WeakishReference12

public abstract class WeakishReference
extends java.lang.Object

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

Since:
ant1.6

Nested Class Summary
static class WeakishReference.HardReference
          A hard reference for Java 1.1
 
Constructor Summary
WeakishReference()
           
 
Method Summary
static WeakishReference createReference(java.lang.Object object)
          create the appropriate type of reference for the java version
abstract  java.lang.Object get()
          Returns this reference object's referent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeakishReference

public WeakishReference()
Method Detail

createReference

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

Parameters:
object -
Returns:
reference to the Object.

get

public abstract java.lang.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 2000-2005 Apache Software Foundation. All Rights Reserved.