[multiple changes]

2004-06-01  Tom Tromey  <tromey@redhat.com>

	* java/io/ObjectStreamField.java: Cleaned up imports.

2004-06-01  Michael Koch  <konqueror@gmx.de>

	* java/io/ObjectStreamField.java: Style and javadoc cleanup.

2004-06-01  Mark Wielaard  <mark@klomp.org>

	* java/io/Writer.java (Writer(Object)): Fixed API doc.

From-SVN: r82545
This commit is contained in:
Michael Koch 2004-06-01 12:47:02 +00:00
parent ea0ece0949
commit c05e85e236
3 changed files with 33 additions and 7 deletions

View file

@ -1,3 +1,15 @@
2004-06-01 Tom Tromey <tromey@redhat.com>
* java/io/ObjectStreamField.java: Cleaned up imports.
2004-06-01 Michael Koch <konqueror@gmx.de>
* java/io/ObjectStreamField.java: Style and javadoc cleanup.
2004-06-01 Mark Wielaard <mark@klomp.org>
* java/io/Writer.java (Writer(Object)): Fixed API doc.
2004-06-01 Michael Koch <konqueror@gmx.de> 2004-06-01 Michael Koch <konqueror@gmx.de>
* java/security/Security.java * java/security/Security.java

View file

@ -1,5 +1,5 @@
/* ObjectStreamField.java -- Class used to store name and class of fields /* 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. This file is part of GNU Classpath.
@ -38,9 +38,10 @@ exception statement from your version. */
package java.io; package java.io;
import gnu.java.lang.reflect.TypeSignature;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import gnu.java.lang.reflect.TypeSignature;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
@ -87,6 +88,7 @@ public class ObjectStreamField implements Comparable
* *
* @param name Name of the field to export. * @param name Name of the field to export.
* @param type Type of the field in the concerned class. * @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) public ObjectStreamField (String name, Class type, boolean unshared)
{ {
@ -238,9 +240,16 @@ public class ObjectStreamField implements Comparable
return typename.length() == 1; 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 this_is_primitive = isPrimitive ();
boolean f_is_primitive = f.isPrimitive (); boolean f_is_primitive = f.isPrimitive ();
@ -348,6 +357,11 @@ public class ObjectStreamField implements Comparable
" in class " + field.getDeclaringClass()); " in class " + field.getDeclaringClass());
} }
/**
* Returns a string representing this object.
*
* @return the string.
*/
public String toString () public String toString ()
{ {
return "ObjectStreamField< " + type + " " + name + " >"; return "ObjectStreamField< " + type + " " + name + " >";
@ -364,7 +378,7 @@ public class ObjectStreamField implements Comparable
throw new InternalError(x.getMessage()); throw new InternalError(x.getMessage());
} }
} }
final void setByteField(Object obj, byte val) final void setByteField(Object obj, byte val)
{ {
try try
@ -400,7 +414,7 @@ public class ObjectStreamField implements Comparable
throw new InternalError(x.getMessage()); throw new InternalError(x.getMessage());
} }
} }
final void setIntField(Object obj, int val) final void setIntField(Object obj, int val)
{ {
try try

View file

@ -76,7 +76,7 @@ public abstract class Writer
* on the specified <code>Object</code>. * on the specified <code>Object</code>.
* *
* @param lock The <code>Object</code> to use for synchronizing critical * @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) protected Writer(Object lock)
{ {