Commit c05e85e2 by Michael Koch

[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
parent ea0ece09
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>
* java/security/Security.java
......
/* 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
......
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment