You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/05/26 15:55:57 UTC
svn commit: r409671 - in
/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref:
PhantomReference.java Reference.java SoftReference.java WeakReference.java
Author: tellison
Date: Fri May 26 06:55:57 2006
New Revision: 409671
URL: http://svn.apache.org/viewvc?rev=409671&view=rev
Log:
Formatting changes to java.lang.ref stubs
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/PhantomReference.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/Reference.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/SoftReference.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/WeakReference.java
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/PhantomReference.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/PhantomReference.java?rev=409671&r1=409670&r2=409671&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/PhantomReference.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/PhantomReference.java Fri May 26 06:55:57 2006
@@ -23,27 +23,26 @@
*/
public class PhantomReference<T> extends Reference<T> {
- /**
- * Return the referent of the reference object. Phantom reference objects
- * referents are inaccessible, and so null is returned.
- *
- *
- * @return Object Returns null.
- */
- public T get() {
- return null;
- }
+ /**
+ * Return the referent of the reference object. Phantom reference objects
+ * referents are inaccessible, and so null is returned.
+ *
+ * @return Object Returns null.
+ */
+ public T get() {
+ return null;
+ }
- /**
- * Constructs a new instance of this class.
- *
- *
- * @param r
- * referent to track.
- * @param q
- * queue to register to the reference object with.
- */
- public PhantomReference(T r, ReferenceQueue<? super T> q) {
- super();
- }
+ /**
+ * Constructs a new instance of this class.
+ *
+ *
+ * @param r
+ * referent to track.
+ * @param q
+ * queue to register to the reference object with.
+ */
+ public PhantomReference(T r, ReferenceQueue<? super T> q) {
+ super();
+ }
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/Reference.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/Reference.java?rev=409671&r1=409670&r2=409671&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/Reference.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/Reference.java Fri May 26 06:55:57 2006
@@ -27,94 +27,92 @@
*/
public abstract class Reference<T> extends Object {
- /**
- * Make the referent null. This does not force the reference object to be
- * enqueued.
- *
- */
- public void clear() {
- return;
- }
-
- /**
- * Force the reference object to be enqueued if it has been associated with
- * a queue.
- *
- * @return boolean true if Reference is enqueued. false otherwise.
- */
- public boolean enqueue() {
- return false;
- }
-
- /**
- * Return the referent of the reference object.
- *
- * @return Referent to which reference refers, or null if object has
- * been cleared.
- */
- public T get() {
- return null;
- }
-
- /**
- * Return whether the reference object has been enqueued.
- *
- * @return boolean true if Reference has been enqueued. false otherwise.
- */
- public boolean isEnqueued() {
- return false;
- }
-
- /**
- * Enqueue the reference object on the associated queue.
- *
- * @return boolean true if the Reference was successfully enqueued. false
- * otherwise.
- */
- boolean enqueueImpl() {
- return false;
- }
-
- /**
- * Constructs a new instance of this class.
- *
- */
- Reference() {
- super();
- }
-
- /**
- * Implement this method to support the provided subclass implementations.
- * Initialize a newly created reference object. Associate the reference
- * object with the referent.
- *
- * @param r
- * the referent
- */
- void initReference(Object r) {
- return;
- }
-
- /**
- * Implement this method to support the provided subclass implementations.
- * Initialize a newly created reference object. Associate the reference
- * object with the referent, and the specified ReferenceQueue.
- *
- * @param r
- * the referent
- * @param q
- * the ReferenceQueue
- */
- void initReference(Object r, ReferenceQueue q) {
- return;
- }
-
- /**
- * Called when a Reference has been removed from its ReferenceQueue.
- * Set the enqueued field to false.
- */
- void dequeue() {
- return;
- }
-
+ /**
+ * Make the referent null. This does not force the reference object to be
+ * enqueued.
+ */
+ public void clear() {
+ return;
+ }
+
+ /**
+ * Force the reference object to be enqueued if it has been associated with
+ * a queue.
+ *
+ * @return boolean true if Reference is enqueued. false otherwise.
+ */
+ public boolean enqueue() {
+ return false;
+ }
+
+ /**
+ * Return the referent of the reference object.
+ *
+ * @return Referent to which reference refers, or null if object has been
+ * cleared.
+ */
+ public T get() {
+ return null;
+ }
+
+ /**
+ * Return whether the reference object has been enqueued.
+ *
+ * @return boolean true if Reference has been enqueued. false otherwise.
+ */
+ public boolean isEnqueued() {
+ return false;
+ }
+
+ /**
+ * Enqueue the reference object on the associated queue.
+ *
+ * @return boolean true if the Reference was successfully enqueued. false
+ * otherwise.
+ */
+ boolean enqueueImpl() {
+ return false;
+ }
+
+ /**
+ * Constructs a new instance of this class.
+ *
+ */
+ Reference() {
+ super();
+ }
+
+ /**
+ * Implement this method to support the provided subclass implementations.
+ * Initialize a newly created reference object. Associate the reference
+ * object with the referent.
+ *
+ * @param r
+ * the referent
+ */
+ void initReference(Object r) {
+ return;
+ }
+
+ /**
+ * Implement this method to support the provided subclass implementations.
+ * Initialize a newly created reference object. Associate the reference
+ * object with the referent, and the specified ReferenceQueue.
+ *
+ * @param r
+ * the referent
+ * @param q
+ * the ReferenceQueue
+ */
+ void initReference(Object r, ReferenceQueue q) {
+ return;
+ }
+
+ /**
+ * Called when a Reference has been removed from its ReferenceQueue. Set the
+ * enqueued field to false.
+ */
+ void dequeue() {
+ return;
+ }
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/SoftReference.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/SoftReference.java?rev=409671&r1=409670&r2=409671&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/SoftReference.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/SoftReference.java Fri May 26 06:55:57 2006
@@ -23,41 +23,35 @@
*/
public class SoftReference<T> extends Reference<T> {
- private int age;
+ /**
+ * Constructs a new instance of this class.
+ *
+ * @param r
+ * referent to track.
+ * @param q
+ * queue to register to the reference object with.
+ */
+ public SoftReference(T r, ReferenceQueue<? super T> q) {
+ initReference(r, q);
+ }
- /**
- * Constructs a new instance of this class.
- *
- *
- * @param r
- * referent to track.
- * @param q
- * queue to register to the reference object with.
- */
- public SoftReference(T r, ReferenceQueue<? super T> q) {
- initReference(r, q);
- }
-
- /**
- * Constructs a new instance of this class.
- *
- *
- * @param r
- * referent to track.
- */
- public SoftReference(T r) {
- initReference(r);
- }
-
- /**
- * Return the referent of the reference object.
- *
- *
- * @return Object Referent to which reference refers, or null if object has
- * been cleared.
- */
- public T get() {
- return super.get();
- }
+ /**
+ * Constructs a new instance of this class.
+ *
+ * @param r
+ * referent to track.
+ */
+ public SoftReference(T r) {
+ initReference(r);
+ }
+ /**
+ * Return the referent of the reference object.
+ *
+ * @return Object Referent to which reference refers, or null if object has
+ * been cleared.
+ */
+ public T get() {
+ return super.get();
+ }
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/WeakReference.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/WeakReference.java?rev=409671&r1=409670&r2=409671&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/WeakReference.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/WeakReference.java Fri May 26 06:55:57 2006
@@ -21,29 +21,27 @@
*
* @since JDK1.2
*/
-public class WeakReference<T> extends java.lang.ref.Reference<T> {
+public class WeakReference<T> extends Reference<T> {
- /**
- * Constructs a new instance of this class.
- *
- *
- * @param r
- * referent to track.
- * @param q
- * queue to register to the reference object with.
- */
- public WeakReference(T r, ReferenceQueue<? super T> q) {
- initReference(r, q);
- }
+ /**
+ * Constructs a new instance of this class.
+ *
+ * @param r
+ * referent to track.
+ * @param q
+ * queue to register to the reference object with.
+ */
+ public WeakReference(T r, ReferenceQueue<? super T> q) {
+ initReference(r, q);
+ }
- /**
- * Constructs a new instance of this class.
- *
- *
- * @param r
- * referent to track.
- */
- public WeakReference(T r) {
- initReference(r);
- }
+ /**
+ * Constructs a new instance of this class.
+ *
+ * @param r
+ * referent to track.
+ */
+ public WeakReference(T r) {
+ initReference(r);
+ }
}