DataInput.java: Merge with Classpath.

* java/io/DataInput.java:  Merge with Classpath.
	* java/io/DataOutput.java:  Idem.
	* java/io/FilenameFilter.java:  Idem.
	* java/io/Serializable.java:  Idem.
	* java/lang/Cloneable.java:  Idem.
	* java/lang/Comparable.java:  Idem.
	* java/lang/Runnable.java:  Idem.
	* java/lang/reflect/Member.java:  Idem.
	* java/net/ContentHandlerFactory.java:  Idem.
	* java/net/FileNameMap.java:  Idem.
	* java/net/SocketImplFactory.java:  Idem.
	* java/net/SocketOptions.java:  Idem.
	* java/net/URLStreamHandlerFactory.java:  Idem.

From-SVN: r45910
This commit is contained in:
Mark Wielaard
2001-09-30 18:04:38 +00:00
committed by Mark Wielaard
parent c9b9c05cc1
commit cfcdbe5480
14 changed files with 1266 additions and 215 deletions
+64 -11
View File
@@ -1,23 +1,76 @@
/* Copyright (C) 1998, 1999 Free Software Foundation
/* Cloneable.java -- Interface for marking objects cloneable by Object.clone()
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
This file is part of libgcj.
This file is part of GNU Classpath.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
package java.lang;
/**
* @author Warren Levy <warrenl@cygnus.com>
* @date September 2, 1998.
*/
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct.
*/
/**
* This interface should be implemented by classes wishing to
* support of override <code>Object.clone()</code>. The default
* behaviour of <code>clone()</code> performs a shallow copy, but
* subclasses often change this to perform a deep copy. Therefore,
* it is a good idea to document how deep your clone will go.
* If <code>clone()</code> is called on an object which does not
* implement this interface, a <code>CloneNotSupportedException</code>
* will be thrown.
* <p>
*
* This interface is simply a tagging interface; it carries no
* requirements on methods to implement. However, it is typical for
* a Cloneable class to implement at least <code>equals</code>,
* <code>hashCode</code>, and <code>clone</code>, sometimes
* increasing the accessibility of clone to be public. The typical
* implementation of <code>clone</code> invokes <code>super.clone()</code>
* rather than a constructor, but this is not a requirement.
* <p>
*
* If an object that implement Cloneable should not be cloned,
* simply override the <code>clone</code> method to throw a
* <code>CloneNotSupportedException</code>.
* <p>
*
* All array types implement Cloneable, and have a public
* <code>clone</code> method that will never fail with a
* <code>CloneNotSupportedException</code>.
*
* @since 1.0
* @author Paul Fisher
* @author Eric Blake <ebb9@email.byu.edu>
* @author Warren Levy <warrenl@cygnus.com>
*
* @see Object#clone()
* @see CloneNotSupportedException
*/
public interface Cloneable
{
// Tagging interface only.
}
+48 -12
View File
@@ -1,22 +1,58 @@
/* Copyright (C) 1998, 1999 Free Software Foundation
/* Comparable.java -- Interface for comparaing objects to obtain an ordering
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
This file is part of libgcj.
This file is part of GNU Classpath.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
package java.lang;
/**
* @author Warren Levy <warrenl@cygnus.com>
* @date September 8, 1998.
*/
/* Written using online API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct.
*/
/**
* Interface for objects that can be ordering among other
* objects. The ordering can be <EM>total</EM>, such that two objects
* only compare equal if they are equal by the equals method, or
* <EM>partial</EM> such that this is not necessarily true. For
* example, a case-sensitive dictionary order comparison of Strings
* is total, but if it is case-insensitive it is partial, because
* "abc" and "ABC" compare as equal even though "abc".equals("ABC")
* returns false.
*
* @author Geoff Berry
* @author Warren Levy <warrenl@cygnus.com>
*
* @since JDK1.2
* @see java.util.Comparator
*/
public interface Comparable
{
public int compareTo(Object o) throws ClassCastException;
/**
* @return a negative integer if this object is less than
* <code>o<code>, zero if this object is equal to <code>o</code>, or
* a positive integer if this object is greater than <code>o</code>
*/
int compareTo( Object o );
}
+39 -12
View File
@@ -1,27 +1,54 @@
// Runnable.java - Runnable interface.
/* java.lang.Runnable
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
/* Copyright (C) 1998, 1999 Free Software Foundation
This file is part of GNU Classpath.
This file is part of libgcj.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.lang;
/**
* @author Tom Tromey <tromey@cygnus.com>
* @date August 25, 1998
*/
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Complete.
*/
/**
* Runnable is an interface you implement to indicate that your class can be
* executed as the main part of a Thread, among other places. When you want
* an entry point to run a piece of code, implement this interface and
* override run.
*
* @author Paul Fisher
* @author Tom Tromey <tromey@cygnus.com>
*/
public interface Runnable
{
public abstract void run ();
/**
* This method will be called by whoever wishes to run your class
* implementing Runnable.
* @since JDK1.0
*/
void run();
}
+71 -16
View File
@@ -1,26 +1,81 @@
/* Copyright (C) 1998, 1999 Free Software Foundation
/* java.lang.reflect.Member
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
This file is part of libgcj.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.lang.reflect;
/**
* @author Per Bothner <bothner@cygnus.com>
* @date September 27, 1998.
*/
/* Written using "Java Class Libraries", 2nd edition.
* Status: Believed complete and correct.
*/
public interface Member
{
public static final int PUBLIC = 0;
public static final int DECLARED = 1;
public Class getDeclaringClass ();
public int getModifiers ();
public String getName();
/**
* Member is an interface that represents any member of a class.
* i.e. a field, a method or a constructor.
* You can get information about the declaring class, name or modifiers of
* the member with this interface.
*
* @author John Keiser
* @author Per Bothner <bothner@cygnus.com>
*/
public interface Member {
/**
* Represents all members, whether public, private, protected or
* package-protected.
* Used in java.lang.SecurityManager.checkMemberAccess() to determine the
* type of members to access.
*/
static final int DECLARED = 1;
/**
* Represents public members only. Used inr
* java.lang.SecurityManager.checkMemberAccess() to determine the type of
* members to access.
*/
static final int PUBLIC = 0;
/**
* Gets the class that declared this member.
* <STRONG>It is unclear whether this returns the class that actually
* syntactically declared the member, or the class where the
* <code>Member</code> object was gotten from.</STRONG>
* @return the class that declared this member.
*/
Class getDeclaringClass();
/**
* Gets the modifiers this member uses. Use the <code>Modifier</code>
* class to interpret the values.
* @see Modifier
* @return an integer representing the modifiers to this Member.
*/
int getModifiers();
/**
* Gets the name of this member.
* @return the name of this member.
*/
String getName();
}