aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/io
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/io')
-rw-r--r--libjava/java/io/ObjectStreamField.java26
-rw-r--r--libjava/java/io/Writer.java2
2 files changed, 21 insertions, 7 deletions
diff --git a/libjava/java/io/ObjectStreamField.java b/libjava/java/io/ObjectStreamField.java
index f4a866e..830a349 100644
--- a/libjava/java/io/ObjectStreamField.java
+++ b/libjava/java/io/ObjectStreamField.java
@@ -1,5 +1,5 @@
/* ObjectStreamField.java -- Class used to store name and class of fields
- Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,9 +38,10 @@ exception statement from your version. */
package java.io;
+import gnu.java.lang.reflect.TypeSignature;
+
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
-import gnu.java.lang.reflect.TypeSignature;
import java.security.AccessController;
import java.security.PrivilegedAction;
@@ -87,6 +88,7 @@ public class ObjectStreamField implements Comparable
*
* @param name Name of the field to export.
* @param type Type of the field in the concerned class.
+ * @param unshared true if field will be unshared, false otherwise.
*/
public ObjectStreamField (String name, Class type, boolean unshared)
{
@@ -238,9 +240,16 @@ public class ObjectStreamField implements Comparable
return typename.length() == 1;
}
- public int compareTo (Object o)
+ /**
+ * Compares this object to the given object.
+ *
+ * @param obj the object to compare to.
+ *
+ * @return -1, 0 or 1.
+ */
+ public int compareTo (Object obj)
{
- ObjectStreamField f = (ObjectStreamField)o;
+ ObjectStreamField f = (ObjectStreamField) obj;
boolean this_is_primitive = isPrimitive ();
boolean f_is_primitive = f.isPrimitive ();
@@ -348,6 +357,11 @@ public class ObjectStreamField implements Comparable
" in class " + field.getDeclaringClass());
}
+ /**
+ * Returns a string representing this object.
+ *
+ * @return the string.
+ */
public String toString ()
{
return "ObjectStreamField< " + type + " " + name + " >";
@@ -364,7 +378,7 @@ public class ObjectStreamField implements Comparable
throw new InternalError(x.getMessage());
}
}
-
+
final void setByteField(Object obj, byte val)
{
try
@@ -400,7 +414,7 @@ public class ObjectStreamField implements Comparable
throw new InternalError(x.getMessage());
}
}
-
+
final void setIntField(Object obj, int val)
{
try
diff --git a/libjava/java/io/Writer.java b/libjava/java/io/Writer.java
index 8248c55..49b6315 100644
--- a/libjava/java/io/Writer.java
+++ b/libjava/java/io/Writer.java
@@ -76,7 +76,7 @@ public abstract class Writer
* on the specified <code>Object</code>.
*
* @param lock The <code>Object</code> to use for synchronizing critical
- * sections. Must be not be null.
+ * sections. Must not be null.
*/
protected Writer(Object lock)
{