harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r413415 - /incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ref/Reference.java
Date Sun, 11 Jun 2006 06:07:07 GMT
Author: hindessm
Date: Sat Jun 10 23:07:07 2006
New Revision: 413415

URL: http://svn.apache.org/viewvc?rev=413415&view=rev
Log:
Generification of j.l.ref.Reference to fix compile error with ecj.

Modified:
    incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ref/Reference.java

Modified: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ref/Reference.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ref/Reference.java?rev=413415&r1=413414&r2=413415&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ref/Reference.java
(original)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ref/Reference.java
Sat Jun 10 23:07:07 2006
@@ -25,10 +25,10 @@
  * 
  * @since JDK1.2
  */
-public abstract class Reference extends Object {
+public abstract class Reference<T> extends Object {
 
-    Object referent;
-    ReferenceQueue queue;
+    T referent;
+    ReferenceQueue<T> queue;
     private static ReferenceQueue dummy = new ReferenceQueue();
 
 	/**
@@ -48,7 +48,7 @@
 	 * @return boolean true if Reference is enqueued. false otherwise.
 	 */
 	public boolean enqueue() {
-        ReferenceQueue q;
+        ReferenceQueue<T> q;
         synchronized (this) {
             if (queue == null || queue == dummy) return false;
             q = queue;
@@ -70,7 +70,7 @@
 	 * @return Object Referent to which reference refers, or null if object has
 	 *         been cleared.
 	 */
-	public Object get() {
+	public T get() {
 		return referent;
 	}
 
@@ -99,7 +99,7 @@
 	 * @param r
 	 *            the referent
 	 */
-	void initReference(Object r) {
+	void initReference(T r) {
         referent = r;
         queue = dummy;
 		return;
@@ -115,7 +115,7 @@
 	 * @param q
 	 *            the ReferenceQueue
 	 */
-	void initReference(Object r, ReferenceQueue q) {
+	void initReference(T r, ReferenceQueue<T> q) {
         referent = r;
         queue = q;
 		return;



Mime
View raw message