1 |
/* java.lang.ref.PhantomReference |
/* java.lang.ref.PhantomReference |
2 |
Copyright (C) 1999 Free Software Foundation, Inc. |
Copyright (C) 1999, 2004 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
46 |
* |
* |
47 |
* @author Jochen Hoenicke |
* @author Jochen Hoenicke |
48 |
*/ |
*/ |
49 |
public class PhantomReference |
public class PhantomReference<T> |
50 |
extends Reference |
extends Reference<T> |
51 |
{ |
{ |
52 |
/** |
/** |
53 |
* Creates a new phantom reference. |
* Creates a new phantom reference. |
56 |
* finalized. This mustn't be <code>null</code>. |
* finalized. This mustn't be <code>null</code>. |
57 |
* @exception NullPointerException if q is null. |
* @exception NullPointerException if q is null. |
58 |
*/ |
*/ |
59 |
public PhantomReference(Object referent, ReferenceQueue q) |
public PhantomReference(T referent, ReferenceQueue<? super T> q) |
60 |
{ |
{ |
61 |
super(referent, q); |
super(referent, q); |
62 |
} |
} |
66 |
* @return <code>null</code>, since the refered object may be |
* @return <code>null</code>, since the refered object may be |
67 |
* finalized and thus not accessible. |
* finalized and thus not accessible. |
68 |
*/ |
*/ |
69 |
public Object get() |
public T get() |
70 |
{ |
{ |
71 |
return null; |
return null; |
72 |
} |
} |