aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-09-02 06:18:49 +0000
committerTom Tromey <tromey@gcc.gnu.org>2001-09-02 06:18:49 +0000
commit7eee682ba80fbddd26e9ab9ddfa320711485a405 (patch)
tree13ae69b3ad4acd54e8b54bf7e5e33cea82d78121 /libjava
parent9e0e11bfe4af10bef0a326b926f36a1546ee4882 (diff)
downloadgcc-7eee682ba80fbddd26e9ab9ddfa320711485a405.zip
gcc-7eee682ba80fbddd26e9ab9ddfa320711485a405.tar.gz
gcc-7eee682ba80fbddd26e9ab9ddfa320711485a405.tar.bz2
Makefile.in: Rebuilt.
* Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added UnsupportedClassVersionError. * java/lang/UnsupportedClassVersionError.java: New file from Classpath. * java/io/CharConversionException.java, java/io/EOFException.java, java/io/FileNotFoundException.java, java/io/IOException.java, java/io/InterruptedIOException.java, java/io/ObjectStreamException.java, java/io/OptionalDataException.java, java/io/StreamCorruptedException.java, java/io/SyncFailedException.java, java/io/UTFDataFormatException.java, java/io/UnsupportedEncodingException.java, java/lang/AbstractMethodError.java, java/lang/ArithmeticException.java, java/lang/ArrayIndexOutOfBoundsException.java, java/lang/ArrayStoreException.java, java/lang/ClassCastException.java, java/lang/ClassCircularityError.java, java/lang/ClassFormatError.java, java/lang/CloneNotSupportedException.java, java/lang/Error.java, java/lang/Exception.java, java/lang/ExceptionInInitializerError.java, java/lang/IllegalAccessError.java, java/lang/IllegalAccessException.java, java/lang/IllegalArgumentException.java, java/lang/IllegalMonitorStateException.java, java/lang/IllegalStateException.java, java/lang/IllegalThreadStateException.java, java/lang/IncompatibleClassChangeError.java, java/lang/IndexOutOfBoundsException.java, java/lang/InstantiationError.java, java/lang/InstantiationException.java, java/lang/InternalError.java, java/lang/InterruptedException.java, java/lang/LinkageError.java, java/lang/NegativeArraySizeException.java, java/lang/NoClassDefFoundError.java, java/lang/NoSuchFieldError.java, java/lang/NoSuchFieldException.java, java/lang/NoSuchMethodError.java, java/lang/NoSuchMethodException.java, java/lang/NullPointerException.java, java/lang/NumberFormatException.java, java/lang/OutOfMemoryError.java, java/lang/RuntimeException.java, java/lang/SecurityException.java, java/lang/StackOverflowError.java, java/lang/StringIndexOutOfBoundsException.java, java/lang/ThreadDeath.java, java/lang/UnknownError.java, java/lang/UnsatisfiedLinkError.java, java/lang/UnsupportedOperationException.java, java/lang/VerifyError.java, java/lang/VirtualMachineError.java, java/lang/reflect/InvocationTargetException.java, java/net/BindException.java, java/net/ConnectException.java, java/net/MalformedURLException.java, java/net/NoRouteToHostException.java, java/net/ProtocolException.java, java/net/SocketException.java, java/net/UnknownHostException.java, java/net/UnknownServiceException.java, java/text/ParseException.java: Copied from Classpath, thanks to Mark Wielaard who did the merge. * java/lang/System.java (getProperty): Use single argument form of SecurityManager.checkPropertyAccess. * Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added VMSecurityManager. * java/lang/VMSecurityManager.java: New file. * java/lang/SecurityManager.java: Merged with Classpath. From-SVN: r45353
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog72
-rw-r--r--libjava/Makefile.am2
-rw-r--r--libjava/Makefile.in9
-rw-r--r--libjava/java/io/CharConversionException.java81
-rw-r--r--libjava/java/io/EOFException.java85
-rw-r--r--libjava/java/io/FileNotFoundException.java81
-rw-r--r--libjava/java/io/IOException.java83
-rw-r--r--libjava/java/io/InterruptedIOException.java108
-rw-r--r--libjava/java/io/ObjectStreamException.java84
-rw-r--r--libjava/java/io/StreamCorruptedException.java83
-rw-r--r--libjava/java/io/SyncFailedException.java76
-rw-r--r--libjava/java/io/UTFDataFormatException.java81
-rw-r--r--libjava/java/io/UnsupportedEncodingException.java83
-rw-r--r--libjava/java/lang/AbstractMethodError.java75
-rw-r--r--libjava/java/lang/ArithmeticException.java74
-rw-r--r--libjava/java/lang/ArrayIndexOutOfBoundsException.java77
-rw-r--r--libjava/java/lang/ArrayStoreException.java73
-rw-r--r--libjava/java/lang/ClassCastException.java78
-rw-r--r--libjava/java/lang/ClassCircularityError.java73
-rw-r--r--libjava/java/lang/ClassFormatError.java72
-rw-r--r--libjava/java/lang/CloneNotSupportedException.java77
-rw-r--r--libjava/java/lang/Error.java79
-rw-r--r--libjava/java/lang/Exception.java73
-rw-r--r--libjava/java/lang/ExceptionInInitializerError.java195
-rw-r--r--libjava/java/lang/IllegalAccessError.java79
-rw-r--r--libjava/java/lang/IllegalAccessException.java78
-rw-r--r--libjava/java/lang/IllegalArgumentException.java73
-rw-r--r--libjava/java/lang/IllegalMonitorStateException.java76
-rw-r--r--libjava/java/lang/IllegalStateException.java74
-rw-r--r--libjava/java/lang/IllegalThreadStateException.java75
-rw-r--r--libjava/java/lang/IncompatibleClassChangeError.java76
-rw-r--r--libjava/java/lang/IndexOutOfBoundsException.java78
-rw-r--r--libjava/java/lang/InstantiationError.java79
-rw-r--r--libjava/java/lang/InstantiationException.java75
-rw-r--r--libjava/java/lang/InternalError.java75
-rw-r--r--libjava/java/lang/InterruptedException.java76
-rw-r--r--libjava/java/lang/LinkageError.java76
-rw-r--r--libjava/java/lang/NegativeArraySizeException.java74
-rw-r--r--libjava/java/lang/NoClassDefFoundError.java79
-rw-r--r--libjava/java/lang/NoSuchFieldError.java76
-rw-r--r--libjava/java/lang/NoSuchFieldException.java73
-rw-r--r--libjava/java/lang/NoSuchMethodError.java76
-rw-r--r--libjava/java/lang/NoSuchMethodException.java73
-rw-r--r--libjava/java/lang/NullPointerException.java74
-rw-r--r--libjava/java/lang/NumberFormatException.java75
-rw-r--r--libjava/java/lang/OutOfMemoryError.java74
-rw-r--r--libjava/java/lang/RuntimeException.java76
-rw-r--r--libjava/java/lang/SecurityException.java73
-rw-r--r--libjava/java/lang/SecurityManager.java1011
-rw-r--r--libjava/java/lang/StackOverflowError.java75
-rw-r--r--libjava/java/lang/StringIndexOutOfBoundsException.java86
-rw-r--r--libjava/java/lang/System.java2
-rw-r--r--libjava/java/lang/ThreadDeath.java53
-rw-r--r--libjava/java/lang/UnknownError.java73
-rw-r--r--libjava/java/lang/UnsatisfiedLinkError.java76
-rw-r--r--libjava/java/lang/UnsupportedClassVersionError.java58
-rw-r--r--libjava/java/lang/UnsupportedOperationException.java61
-rw-r--r--libjava/java/lang/VMSecurityManager.java71
-rw-r--r--libjava/java/lang/VerifyError.java73
-rw-r--r--libjava/java/lang/VirtualMachineError.java79
-rw-r--r--libjava/java/lang/reflect/InvocationTargetException.java139
-rw-r--r--libjava/java/net/BindException.java80
-rw-r--r--libjava/java/net/ConnectException.java82
-rw-r--r--libjava/java/net/MalformedURLException.java80
-rw-r--r--libjava/java/net/NoRouteToHostException.java81
-rw-r--r--libjava/java/net/ProtocolException.java81
-rw-r--r--libjava/java/net/SocketException.java81
-rw-r--r--libjava/java/net/UnknownHostException.java83
-rw-r--r--libjava/java/net/UnknownServiceException.java82
-rw-r--r--libjava/java/text/ParseException.java99
70 files changed, 4700 insertions, 1593 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 250258a..d224994 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,75 @@
+2001-09-01 Tom Tromey <tromey@redhat.com>
+
+ * Makefile.in: Rebuilt.
+ * Makefile.am (core_java_source_files): Added
+ UnsupportedClassVersionError.
+ * java/lang/UnsupportedClassVersionError.java: New file from
+ Classpath.
+
+ * java/io/CharConversionException.java, java/io/EOFException.java,
+ java/io/FileNotFoundException.java, java/io/IOException.java,
+ java/io/InterruptedIOException.java,
+ java/io/ObjectStreamException.java,
+ java/io/OptionalDataException.java,
+ java/io/StreamCorruptedException.java,
+ java/io/SyncFailedException.java,
+ java/io/UTFDataFormatException.java,
+ java/io/UnsupportedEncodingException.java,
+ java/lang/AbstractMethodError.java,
+ java/lang/ArithmeticException.java,
+ java/lang/ArrayIndexOutOfBoundsException.java,
+ java/lang/ArrayStoreException.java,
+ java/lang/ClassCastException.java,
+ java/lang/ClassCircularityError.java,
+ java/lang/ClassFormatError.java,
+ java/lang/CloneNotSupportedException.java, java/lang/Error.java,
+ java/lang/Exception.java,
+ java/lang/ExceptionInInitializerError.java,
+ java/lang/IllegalAccessError.java,
+ java/lang/IllegalAccessException.java,
+ java/lang/IllegalArgumentException.java,
+ java/lang/IllegalMonitorStateException.java,
+ java/lang/IllegalStateException.java,
+ java/lang/IllegalThreadStateException.java,
+ java/lang/IncompatibleClassChangeError.java,
+ java/lang/IndexOutOfBoundsException.java,
+ java/lang/InstantiationError.java,
+ java/lang/InstantiationException.java,
+ java/lang/InternalError.java, java/lang/InterruptedException.java,
+ java/lang/LinkageError.java,
+ java/lang/NegativeArraySizeException.java,
+ java/lang/NoClassDefFoundError.java,
+ java/lang/NoSuchFieldError.java,
+ java/lang/NoSuchFieldException.java,
+ java/lang/NoSuchMethodError.java,
+ java/lang/NoSuchMethodException.java,
+ java/lang/NullPointerException.java,
+ java/lang/NumberFormatException.java,
+ java/lang/OutOfMemoryError.java, java/lang/RuntimeException.java,
+ java/lang/SecurityException.java,
+ java/lang/StackOverflowError.java,
+ java/lang/StringIndexOutOfBoundsException.java,
+ java/lang/ThreadDeath.java, java/lang/UnknownError.java,
+ java/lang/UnsatisfiedLinkError.java,
+ java/lang/UnsupportedOperationException.java,
+ java/lang/VerifyError.java, java/lang/VirtualMachineError.java,
+ java/lang/reflect/InvocationTargetException.java,
+ java/net/BindException.java, java/net/ConnectException.java,
+ java/net/MalformedURLException.java,
+ java/net/NoRouteToHostException.java,
+ java/net/ProtocolException.java, java/net/SocketException.java,
+ java/net/UnknownHostException.java,
+ java/net/UnknownServiceException.java,
+ java/text/ParseException.java: Copied from Classpath, thanks to
+ Mark Wielaard who did the merge.
+
+ * java/lang/System.java (getProperty): Use single argument form of
+ SecurityManager.checkPropertyAccess.
+ * Makefile.in: Rebuilt.
+ * Makefile.am (core_java_source_files): Added VMSecurityManager.
+ * java/lang/VMSecurityManager.java: New file.
+ * java/lang/SecurityManager.java: Merged with Classpath.
+
2001-08-31 Per Bothner <per@bothner.com>
* gcj/javaprims.h (_Jv_RegisterClassHook): New extern declaration.
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index c88d63c0..963f631 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -965,10 +965,12 @@ java/lang/ThreadLocal.java \
java/lang/Throwable.java \
java/lang/UnknownError.java \
java/lang/UnsatisfiedLinkError.java \
+java/lang/UnsupportedClassVersionError.java \
java/lang/UnsupportedOperationException.java \
java/lang/VerifyError.java \
java/lang/VirtualMachineError.java \
java/lang/VMClassLoader.java \
+java/lang/VMSecurityManager.java \
java/lang/Void.java \
java/io/BufferedInputStream.java \
java/io/BufferedOutputStream.java \
diff --git a/libjava/Makefile.in b/libjava/Makefile.in
index 7d1122d..334ea77 100644
--- a/libjava/Makefile.in
+++ b/libjava/Makefile.in
@@ -720,10 +720,12 @@ java/lang/ThreadLocal.java \
java/lang/Throwable.java \
java/lang/UnknownError.java \
java/lang/UnsatisfiedLinkError.java \
+java/lang/UnsupportedClassVersionError.java \
java/lang/UnsupportedOperationException.java \
java/lang/VerifyError.java \
java/lang/VirtualMachineError.java \
java/lang/VMClassLoader.java \
+java/lang/VMSecurityManager.java \
java/lang/Void.java \
java/io/BufferedInputStream.java \
java/io/BufferedOutputStream.java \
@@ -1798,10 +1800,11 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
.deps/java/lang/ThreadDeath.P .deps/java/lang/ThreadGroup.P \
.deps/java/lang/ThreadLocal.P .deps/java/lang/Throwable.P \
.deps/java/lang/UnknownError.P .deps/java/lang/UnsatisfiedLinkError.P \
+.deps/java/lang/UnsupportedClassVersionError.P \
.deps/java/lang/UnsupportedOperationException.P \
-.deps/java/lang/VMClassLoader.P .deps/java/lang/VerifyError.P \
-.deps/java/lang/VirtualMachineError.P .deps/java/lang/Void.P \
-.deps/java/lang/dtoa.P .deps/java/lang/e_acos.P \
+.deps/java/lang/VMClassLoader.P .deps/java/lang/VMSecurityManager.P \
+.deps/java/lang/VerifyError.P .deps/java/lang/VirtualMachineError.P \
+.deps/java/lang/Void.P .deps/java/lang/dtoa.P .deps/java/lang/e_acos.P \
.deps/java/lang/e_asin.P .deps/java/lang/e_atan2.P \
.deps/java/lang/e_exp.P .deps/java/lang/e_fmod.P \
.deps/java/lang/e_log.P .deps/java/lang/e_pow.P \
diff --git a/libjava/java/io/CharConversionException.java b/libjava/java/io/CharConversionException.java
index 938d605..e090dfc 100644
--- a/libjava/java/io/CharConversionException.java
+++ b/libjava/java/io/CharConversionException.java
@@ -1,34 +1,75 @@
-// CharConversionException.java - Problem converting char to byte encoding.
+/* CharConversionException.java -- Character conversion exceptions
+ 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.io;
+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. */
-/**
- * @author Tom Tromey <tromey@cygnus.com>
- * @date September 25, 1998
- */
+
+package java.io;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* Status: Complete to 1.1.
*/
+/**
+ * This exception is thrown to indicate that a problem occured with
+ * an attempted character conversion.
+ *
+ * @version 0.0
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date September 25, 1998
+ */
public class CharConversionException extends IOException
{
- public CharConversionException ()
- {
- super ();
- }
-
- public CharConversionException (String s)
- {
- super (s);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Create a new CharConversionException without a descriptive error message
+ */
+public
+CharConversionException()
+{
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Create a new CharConversionException with a descriptive error message String
+ *
+ * @param message The descriptive error message
+ */
+public
+CharConversionException(String message)
+{
+ super(message);
+}
+
+} // class CharConversionException
+
diff --git a/libjava/java/io/EOFException.java b/libjava/java/io/EOFException.java
index e5ae1f0..9a57f5f 100644
--- a/libjava/java/io/EOFException.java
+++ b/libjava/java/io/EOFException.java
@@ -1,34 +1,79 @@
-// EOFException.java - End of file exception
+/* EOFException.java -- Unexpected end of file exception
+ 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.io;
+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. */
-/**
- * @author Tom Tromey <tromey@cygnus.com>
- * @date September 24, 1998
- */
+
+package java.io;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* Status: Complete to 1.1.
*/
+/**
+ * This exception is thrown when the end of the file or stream was
+ * encountered unexpectedly. This is not the normal way that a normal
+ * EOF condition is reported. Normally a special value such as -1 is
+ * returned. However, certain types of streams expecting certain data
+ * in a certain format might reach EOF before reading their expected
+ * data pattern and thus throw this exception.
+ *
+ * @version 0.0
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date September 24, 1998
+ */
public class EOFException extends IOException
{
- public EOFException ()
- {
- super ();
- }
-
- public EOFException (String s)
- {
- super (s);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Create a new EOFException without a descriptive error message
+ */
+public
+EOFException()
+{
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Create a new EOFException with a descriptive error message String
+ *
+ * @param message The descriptive error message
+ */
+public
+EOFException(String message)
+{
+ super(message);
+}
+
+} // class EOFException
+
diff --git a/libjava/java/io/FileNotFoundException.java b/libjava/java/io/FileNotFoundException.java
index 9482b2e..16150b4 100644
--- a/libjava/java/io/FileNotFoundException.java
+++ b/libjava/java/io/FileNotFoundException.java
@@ -1,34 +1,75 @@
-// FileNotFoundException.java
+/* FileNotFoundException.java -- The requested file could not be found
+ 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.io;
+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. */
-/**
- * @author Tom Tromey <tromey@cygnus.com>
- * @date September 24, 1998
- */
+
+package java.io;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* Status: Complete to 1.1.
*/
+/**
+ * This exception is thrown when an attempt is made to access a file that
+ * does not exist.
+ *
+ * @version 0.0
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date September 24, 1998
+ */
public class FileNotFoundException extends IOException
{
- public FileNotFoundException ()
- {
- super ();
- }
-
- public FileNotFoundException (String s)
- {
- super (s);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Create a new FileNotFoundException without a descriptive error message
+ */
+public
+FileNotFoundException()
+{
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Create a new FileNotFoundException with a descriptive error message String
+ *
+ * @param message The descriptive error message
+ */
+public
+FileNotFoundException(String message)
+{
+ super(message);
+}
+
+} // class FileNotFoundException
+
diff --git a/libjava/java/io/IOException.java b/libjava/java/io/IOException.java
index e9b2276..815d926 100644
--- a/libjava/java/io/IOException.java
+++ b/libjava/java/io/IOException.java
@@ -1,34 +1,77 @@
-// IOException.java - Base class for I/O Exceptions
+/* IOException.java -- Generic input/output exception
+ 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.io;
+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. */
-/**
- * @author Tom Tromey <tromey@cygnus.com>
- * @date September 24, 1998
- */
+
+package java.io;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* Status: Complete to 1.1.
*/
+/**
+ * This exception is thrown to indicate an I/O problem of some sort
+ * occurred. Since this is a fairly generic exception, often a subclass
+ * of IOException will actually be thrown in order to provide a more
+ * detailed indication of what happened.
+ *
+ * @version 0.0
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date September 24, 1998
+ */
public class IOException extends Exception
{
- public IOException ()
- {
- super ();
- }
-
- public IOException (String s)
- {
- super (s);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Create a new IOException without a descriptive error message
+ */
+public
+IOException()
+{
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Create a new IOException with a descriptive error message String
+ *
+ * @param message The descriptive error message
+ */
+public
+IOException(String message)
+{
+ super(message);
+}
+
+} // class IOException
+
diff --git a/libjava/java/io/InterruptedIOException.java b/libjava/java/io/InterruptedIOException.java
index 7562382..3722863 100644
--- a/libjava/java/io/InterruptedIOException.java
+++ b/libjava/java/io/InterruptedIOException.java
@@ -1,36 +1,104 @@
-// InterruptedIOException.java
+/* InterruptedIOException.java -- An I/O operation was interrupted.
+ 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.io;
+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. */
-/**
- * @author Tom Tromey <tromey@cygnus.com>
- * @date September 24, 1998
- */
+
+package java.io;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* Status: Complete to 1.1.
*/
+/**
+ * This exception is thrown when a in process I/O operation is
+ * interrupted for some reason. The field bytesTransferred will contain
+ * the number of bytes that were read/written prior to the interruption.
+ *
+ * @version 0.0
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date September 24, 1998
+ */
public class InterruptedIOException extends IOException
{
- public InterruptedIOException ()
- {
- super ();
- }
- public InterruptedIOException (String s)
- {
- super (s);
- }
+private static final long serialVersionUID = 4020568460727500567L;
+
+/*
+ * Instance Variables
+ */
+
+/**
+ * The number of bytes read/written prior to the interruption
+ */
+public int bytesTransferred;
+
+/*************************************************************************/
- public int bytesTransferred = 0;
+/*
+ * Constructors
+ */
+
+/**
+ * Create a new InterruptedIOException without a descriptive error message
+ */
+public
+InterruptedIOException()
+{
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Create a new InterruptedIOException with a descriptive error message String
+ *
+ * @param message The descriptive error message
+ */
+public
+InterruptedIOException(String message)
+{
+ super(message);
+}
+
+/*************************************************************************/
+
+/**
+ * Create a new InterruptedIOException with a descriptive error message
+ * String. Also sets the value of the bytesTransferred field.
+ *
+ * @param message The descriptive error message
+ * @param bytesTransferred The number of bytes tranferred before the interruption
+ */
+InterruptedIOException(String message, int bytesTransferred)
+{
+ super(message);
+ this.bytesTransferred = bytesTransferred;
+}
+
+} // class InterruptedIOException
+
diff --git a/libjava/java/io/ObjectStreamException.java b/libjava/java/io/ObjectStreamException.java
index cb293e8..f006321 100644
--- a/libjava/java/io/ObjectStreamException.java
+++ b/libjava/java/io/ObjectStreamException.java
@@ -1,31 +1,75 @@
-/* Copyright (C) 2000 Free Software Foundation
+/* ObjectStreamException.java -- Superclass of all serialisation exceptions
+ Copyright (C) 1998, 2000, 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.
-package java.io;
+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.
-/**
- * @author Warren Levy <warrenl@cygnus.com>
- * @date February 7, 2000.
- */
+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.io;
/* Written using on-line Java Platform 1.2 API Specification.
* Status: Believed complete and correct.
*/
-public abstract class ObjectStreamException extends IOException
+/**
+ * This exception is thrown when a problem occurs during serialization.
+ * There are more specific subclasses than give more fine grained
+ * indications of the precise failure.
+ *
+ * @version 0.0
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date February 7, 2000.
+ */
+public abstract class ObjectStreamException extends IOException
{
- protected ObjectStreamException()
- {
- super();
- }
-
- protected ObjectStreamException(String msg)
- {
- super(msg);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Create a new ObjectStreamException without a descriptive error message
+ */
+protected
+ObjectStreamException()
+{
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Create a new ObjectStreamException with a descriptive error message String
+ *
+ * @param message The descriptive error message
+ */
+protected
+ObjectStreamException(String message)
+{
+ super(message);
+}
+
+} // class ObjectStreamException
+
diff --git a/libjava/java/io/StreamCorruptedException.java b/libjava/java/io/StreamCorruptedException.java
index 2741319..7f807ca 100644
--- a/libjava/java/io/StreamCorruptedException.java
+++ b/libjava/java/io/StreamCorruptedException.java
@@ -1,31 +1,74 @@
-/* Copyright (C) 2000 Free Software Foundation
+/* StreamCorruptedException.java -- Error in stream during serialization
+ Copyright (C) 1998, 2000, 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.io;
-/**
- * @author Warren Levy <warrenl@cygnus.com>
- * @date February 7, 2000.
+/* Written using on-line Java Platform 1.2 API Specification.
+ * Status: Believed complete and correct.
*/
+
+/**
+ * This exception is thrown when there is an error in the data that is
+ * read from a stream during de-serialization.
+ *
+ * @version 0.0
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date February 7, 2000.
+ */
+public class StreamCorruptedException extends ObjectStreamException
+{
-/* Written using on-line Java Platform 1.2 API Specification.
- * Status: Believed complete and correct.
+/*
+ * Constructors
*/
-public class StreamCorruptedException extends ObjectStreamException
+/**
+ * Create a new StreamCorruptedException without a descriptive error message
+ */
+public
+StreamCorruptedException()
{
- public StreamCorruptedException()
- {
- super();
- }
-
- public StreamCorruptedException(String msg)
- {
- super(msg);
- }
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Create a new StreamCorruptedException with a descriptive error message String
+ *
+ * @param message The descriptive error message
+ */
+public
+StreamCorruptedException(String message)
+{
+ super(message);
+}
+
+} // class StreamCorruptedException
+
diff --git a/libjava/java/io/SyncFailedException.java b/libjava/java/io/SyncFailedException.java
index 964d24a..0ec75d6 100644
--- a/libjava/java/io/SyncFailedException.java
+++ b/libjava/java/io/SyncFailedException.java
@@ -1,29 +1,75 @@
-// SyncFailedException.java
+/* SyncFailedException.java -- The sync failed (?)
+ 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.io;
+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. */
-/**
- * @author Tom Tromey <tromey@cygnus.com>
- * @date September 24, 1998
- */
+
+package java.io;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* Status: Complete to 1.1.
*/
+/**
+ * I really wish I knew what caused this exception to be thrown.
+ *
+ * @version 0.0
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date September 24, 1998
+ */
public class SyncFailedException extends IOException
{
- public SyncFailedException (String s)
- {
- super (s);
- }
+
+private static final long serialVersionUID = -2353342684412443330L;
+
+/*
+ * Constructors
+ */
+
+/**
+ * Create a new SyncFailedException without a descriptive error message
+ */
+SyncFailedException()
+{
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Create a new SyncFailedException with a descriptive error message String
+ *
+ * @param message The descriptive error message
+ */
+public
+SyncFailedException(String message)
+{
+ super(message);
+}
+
+} // class SyncFailedException
+
diff --git a/libjava/java/io/UTFDataFormatException.java b/libjava/java/io/UTFDataFormatException.java
index 16445cd..378e992 100644
--- a/libjava/java/io/UTFDataFormatException.java
+++ b/libjava/java/io/UTFDataFormatException.java
@@ -1,34 +1,75 @@
-// UTFDataFormatException.java
+/* UTFDataFormatException.java -- Bad format in UTF data
+ 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.io;
+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. */
-/**
- * @author Tom Tromey <tromey@cygnus.com>
- * @date September 24, 1998
- */
+
+package java.io;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* Status: Complete to 1.1.
*/
+/**
+ * When reading a UTF string from an input stream, this exception is thrown
+ * to indicate that the data read is invalid.
+ *
+ * @version 0.0
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date September 24, 1998
+ */
public class UTFDataFormatException extends IOException
{
- public UTFDataFormatException ()
- {
- super ();
- }
-
- public UTFDataFormatException (String s)
- {
- super (s);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Create a new UTFDataFormatException without a descriptive error message
+ */
+public
+UTFDataFormatException()
+{
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Create a new UTFDataFormatException with a descriptive error message String
+ *
+ * @param message The descriptive error message
+ */
+public
+UTFDataFormatException(String message)
+{
+ super(message);
+}
+
+} // class UTFDataFormatException
+
diff --git a/libjava/java/io/UnsupportedEncodingException.java b/libjava/java/io/UnsupportedEncodingException.java
index 8ab868e..8ea7f03 100644
--- a/libjava/java/io/UnsupportedEncodingException.java
+++ b/libjava/java/io/UnsupportedEncodingException.java
@@ -1,32 +1,75 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* UnsupportedEncodingException.java -- The requested encoding isn't supported
+ 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.
-package java.io;
+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.
-/**
- * @author Per Bothner <bothner@cygnus.com>
- * @date April 17, 1998.
- */
+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.io;
/* Written using "Java Class Libraries", 2nd edition, plus online
* API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct.
*/
-
+
+/**
+ * This exception is thrown when the requested character encoding is
+ * not supported.
+ *
+ * @version 0.0
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Per Bothner <bothner@cygnus.com>
+ * @date April 17, 1998.
+ */
public class UnsupportedEncodingException extends IOException
{
- public UnsupportedEncodingException ()
- {
- super();
- }
-
- public UnsupportedEncodingException (String msg)
- {
- super(msg);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Create a new UnsupportedEncodingException without a descriptive error message
+ */
+public
+UnsupportedEncodingException()
+{
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Create a new UnsupportedEncodingException with a descriptive error message String
+ *
+ * @param message The descriptive error message
+ */
+public
+UnsupportedEncodingException(String message)
+{
+ super(message);
+}
+
+} // class UnsupportedEncodingException
+
diff --git a/libjava/java/lang/AbstractMethodError.java b/libjava/java/lang/AbstractMethodError.java
index 782e595..b1e48fe 100644
--- a/libjava/java/lang/AbstractMethodError.java
+++ b/libjava/java/lang/AbstractMethodError.java
@@ -1,34 +1,67 @@
-// AbstractMethodError.java
+/* AbstractMethodError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
*/
+/**
+ * An <code>AbstractMethodError</code> is thrown when an application
+ * attempts to access an abstract method. Compilers typically detect
+ * this error, but it can be thrown at run time if the definition of a
+ * class has changed since the application was last compiled.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class AbstractMethodError extends IncompatibleClassChangeError
{
- public AbstractMethodError ()
- {
- super ();
- }
-
- public AbstractMethodError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = -1654391082989018462L;
+
+ /**
+ * Create an error without a message.
+ */
+ public AbstractMethodError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public AbstractMethodError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/ArithmeticException.java b/libjava/java/lang/ArithmeticException.java
index 15278e0..542a909 100644
--- a/libjava/java/lang/ArithmeticException.java
+++ b/libjava/java/lang/ArithmeticException.java
@@ -1,32 +1,68 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* ArithmeticException.java -- exception thrown to indicate conditions
+ like divide by zero.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional circumstances.
+ * In this case an ArithmeticException is thrown when things like trying
+ * to divide a number by zero.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class ArithmeticException extends RuntimeException
{
+ static final long serialVersionUID = 2256477558314496007L;
+
+ /**
+ * Create an exception without a message.
+ */
public ArithmeticException()
- {
- super();
- }
-
- public ArithmeticException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public ArithmeticException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/ArrayIndexOutOfBoundsException.java b/libjava/java/lang/ArrayIndexOutOfBoundsException.java
index 4b912c2..e30af61 100644
--- a/libjava/java/lang/ArrayIndexOutOfBoundsException.java
+++ b/libjava/java/lang/ArrayIndexOutOfBoundsException.java
@@ -1,37 +1,76 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* ArrayIndexOutOfBoundsException.java -- exception thrown when accessing
+ an illegal index.
+ 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 18, 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.
*/
-
+
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions, in this case
+ * when trying to access an illegal index. This exception is thrown when
+ * accessing an index which is either negative or greater than the size of
+ * the array minus one.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException
{
- public ArrayIndexOutOfBoundsException()
- {
+ static final long serialVersionUID = -5116101128118950844L;
+
+ /**
+ * Create an exception without a message.
+ */
+ public ArrayIndexOutOfBoundsException() {
super();
}
- public ArrayIndexOutOfBoundsException(int index)
- {
- this("Array index out of range: " + index);
+ /**
+ * Create an exception with a message.
+ */
+ public ArrayIndexOutOfBoundsException(String s) {
+ super(s);
}
- public ArrayIndexOutOfBoundsException(String msg)
- {
- super(msg);
+ /**
+ * Create an exception indicating the illegal index.
+ */
+ public ArrayIndexOutOfBoundsException(int index) {
+ super("Array index out of range: " + index);
}
+
}
diff --git a/libjava/java/lang/ArrayStoreException.java b/libjava/java/lang/ArrayStoreException.java
index 720308e..c2446c6 100644
--- a/libjava/java/lang/ArrayStoreException.java
+++ b/libjava/java/lang/ArrayStoreException.java
@@ -1,32 +1,67 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* ArrayStoreException.java -- exception thrown to when trying to store an
+ object into an array of a different type.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions, in this case
+ * when trying to store an object into an array of a different type.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class ArrayStoreException extends RuntimeException
{
+ static final long serialVersionUID = -4522193890499838241L;
+
+ /**
+ * Create an exception without a message.
+ */
public ArrayStoreException()
- {
- super();
- }
-
- public ArrayStoreException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public ArrayStoreException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/ClassCastException.java b/libjava/java/lang/ClassCastException.java
index 912e870..1e0512e 100644
--- a/libjava/java/lang/ClassCastException.java
+++ b/libjava/java/lang/ClassCastException.java
@@ -1,32 +1,72 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* ClassCastException.java -- exception thrown when incorrectly trying to
+ cast an object to a subclass it does not belong to.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions. In this case
+ * when incorrectly trying to cast an object to a subclass it does not
+ * belong to. The following code generates a <code>ClassCastException</code>.
+ * <pre>
+ * Object o = new Vector();
+ * String s = (String)o;
+ * </pre>
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class ClassCastException extends RuntimeException
{
+ static final long serialVersionUID = -9223365651070458532L;
+
+ /**
+ * Create an exception without a message.
+ */
public ClassCastException()
- {
- super();
- }
-
- public ClassCastException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public ClassCastException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/ClassCircularityError.java b/libjava/java/lang/ClassCircularityError.java
index 21bda92c..c41856e 100644
--- a/libjava/java/lang/ClassCircularityError.java
+++ b/libjava/java/lang/ClassCircularityError.java
@@ -1,34 +1,65 @@
-// ClassCircularityError.java
+/* ClassCircularityError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
*/
+/**
+ * A <code>ClassCircularityError</code> is thrown when a circular dependency
+ * has been detected while initializing a class.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class ClassCircularityError extends LinkageError
{
- public ClassCircularityError ()
- {
- super ();
- }
-
- public ClassCircularityError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = 1054362542914539689L;
+
+ /**
+ * Create an error without a message.
+ */
+ public ClassCircularityError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public ClassCircularityError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/ClassFormatError.java b/libjava/java/lang/ClassFormatError.java
index 2af5008..51866ba 100644
--- a/libjava/java/lang/ClassFormatError.java
+++ b/libjava/java/lang/ClassFormatError.java
@@ -1,34 +1,64 @@
-// ClassFormatError.java
+/* ClassFormatError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
*/
+/**
+ * A <code>ClassFormatError</code> is thrown when a Java Virtual Machine
+ * unable to read a class file because the file is corrupted or cannot be
+ * interpreted as a class file.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ */
public class ClassFormatError extends LinkageError
{
- public ClassFormatError ()
- {
- super ();
- }
-
- public ClassFormatError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = -8420114879011949195L;
+
+ /**
+ * Create an error without a message.
+ */
+ public ClassFormatError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public ClassFormatError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/CloneNotSupportedException.java b/libjava/java/lang/CloneNotSupportedException.java
index 62c0c04..23e199a 100644
--- a/libjava/java/lang/CloneNotSupportedException.java
+++ b/libjava/java/lang/CloneNotSupportedException.java
@@ -1,32 +1,71 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* CloneNotSupportedException.java -- exception thrown to indicate that
+ the object calling the clone method of Object does not implement the
+ Cloneable interface.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * Thrown to indicate an object should not or could not be cloned.
+ * For example <code>CloneNotSupportedException</code> is thrown by
+ * the <code>clone</code> method of <code>Object</code> to indicate
+ * that object does not implement the <code>Cloneable</code> interface.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class CloneNotSupportedException extends Exception
{
+ static final long serialVersionUID = 5195511250079656443L;
+
+ /**
+ * Create an exception without a message.
+ */
public CloneNotSupportedException()
- {
- super();
- }
-
- public CloneNotSupportedException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public CloneNotSupportedException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/Error.java b/libjava/java/lang/Error.java
index a9f9d80..5a0c3cc 100644
--- a/libjava/java/lang/Error.java
+++ b/libjava/java/lang/Error.java
@@ -1,34 +1,71 @@
-// Error.java
+/* Error.java - Indication of fatal abnormal conditions
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
*/
+/**
+ * Applications should not try to catch errors since they indicate
+ * abnormal conditions. An abnormal condition is something which should not
+ * occur. A few errors, like <code>ThreadDeath</code> error do normally
+ * occur, but most applications should not catch it.
+ * <p>
+ * A method is not required to declare any subclass of <code>Error</code> in
+ * its <code>throws</code> clause which might be thrown but not caught while
+ * executing the method..
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class Error extends Throwable
{
- public Error ()
- {
- super ();
- }
-
- public Error (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = 4980196508277280342L;
+
+ /**
+ * Create an error without a message.
+ */
+ public Error()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public Error(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/Exception.java b/libjava/java/lang/Exception.java
index 71df1dd..90fc888 100644
--- a/libjava/java/lang/Exception.java
+++ b/libjava/java/lang/Exception.java
@@ -1,32 +1,67 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* Exception.java -- generic exception thrown to indicate an exceptional
+ condition has occurred.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with the cause of the exception, such as
+ * mouse movements, keyboard clicking, etc.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class Exception extends Throwable
{
+ static final long serialVersionUID = -3387516993124229948L;
+
+ /**
+ * Create an exception without a message.
+ */
public Exception()
- {
- super();
- }
-
- public Exception(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public Exception(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/ExceptionInInitializerError.java b/libjava/java/lang/ExceptionInInitializerError.java
index d43a859..3ecc5f5 100644
--- a/libjava/java/lang/ExceptionInInitializerError.java
+++ b/libjava/java/lang/ExceptionInInitializerError.java
@@ -1,85 +1,144 @@
-// ExceptionInInitializerError.java
+/* ExceptionInInitializerError.java
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-/* Copyright (C) 1998, 1999, 2000, 2001 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;
+
import java.io.PrintStream;
import java.io.PrintWriter;
-/**
- * @author Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
*/
+/**
+ * An <code>ExceptionInInitializerError</code> is thrown when an
+ * unexpected exception has occurred in a static initializer or the
+ * initializer for a static variable.
+ *
+ * @since JDK 1.1
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class ExceptionInInitializerError extends LinkageError
{
- public ExceptionInInitializerError ()
- {
- super ();
- exception = null;
- }
-
- public ExceptionInInitializerError (String msg)
- {
- super (msg);
- exception = null;
- }
-
- public ExceptionInInitializerError (Throwable e)
- {
- super (e.toString());
- exception = e;
- }
-
- public Throwable getException ()
- {
- return exception;
- }
-
- public void printStackTrace ()
- {
- if (exception != null)
- {
- System.err.print (this.getClass().getName() + ": ");
- exception.printStackTrace ();
- }
- else
- super.printStackTrace ();
- }
-
- public void printStackTrace (PrintStream ps)
- {
- if (exception != null)
- {
- ps.print (this.getClass().getName() + ": ");
- exception.printStackTrace (ps);
- }
- else
- super.printStackTrace (ps);
- }
-
- public void printStackTrace (PrintWriter pw)
- {
- if (exception != null)
- {
- pw.print (this.getClass().getName() + ": ");
- exception.printStackTrace (pw);
- }
- else
- super.printStackTrace (pw);
- }
-
- // The exception that caused this error.
- private Throwable exception;
+ static final long serialVersionUID = 1521711792217232256L;
+
+ private Throwable exception = null;
+
+ /**
+ * Create an error without a message.
+ */
+ public ExceptionInInitializerError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public ExceptionInInitializerError(String s)
+ {
+ super(s);
+ }
+
+ /**
+ * Creates an error an saves a reference to the <code>Throwable</code>
+ * object.
+ *
+ * @param t the exception thrown
+ */
+ public ExceptionInInitializerError(Throwable t)
+ {
+ super(t.toString());
+ exception = t;
+ }
+
+ /**
+ * Return the exception that caused this error to be created.
+ * @return the stored <code>Throwable</code> object or <code>null</code>
+ * if this <code>ExceptionInInitializerError</code> has no stored
+ * <code>Throwable</code> object.
+ */
+ public Throwable getException()
+ {
+ return exception;
+ }
+
+ /**
+ * Print a stack trace of the exception that occurred.
+ */
+ public void printStackTrace()
+ {
+ if (exception == null)
+ {
+ super.printStackTrace();
+ }
+ else
+ {
+ System.err.print(this.getClass() + ": ");
+ exception.printStackTrace();
+ }
+ }
+
+ /**
+ * Print a stack trace of the exception that occurred to
+ * the specified <code>PrintStream</code>.
+ */
+ public void printStackTrace(PrintStream ps)
+ {
+ if (exception == null)
+ {
+ super.printStackTrace(ps);
+ }
+ else
+ {
+ ps.print(this.getClass() + ": ");
+ exception.printStackTrace(ps);
+ }
+ }
+
+ /**
+ * Print a stack trace of the exception that occurred to
+ * the specified <code>PrintWriter</code>.
+ */
+ public void printStackTrace(PrintWriter pw)
+ {
+ if (exception == null)
+ {
+ super.printStackTrace(pw);
+ }
+ else
+ {
+ pw.print(this.getClass() + ": ");
+ exception.printStackTrace(pw);
+ }
+ }
}
diff --git a/libjava/java/lang/IllegalAccessError.java b/libjava/java/lang/IllegalAccessError.java
index a2cf57d..3fbde94 100644
--- a/libjava/java/lang/IllegalAccessError.java
+++ b/libjava/java/lang/IllegalAccessError.java
@@ -1,34 +1,69 @@
-// IllegalAccessError.java
+/* IllegalAccessError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
+ * Status: Believed complete and correct.
*/
+/**
+ * An <code>IllegalAccessError</code> is thrown when an attempt is made to
+ * call a method, or access or modify a field that the application does not
+ * have access to. Because this error is usually caught by a compiler,
+ * the error only occurs at runtime when the definition of a class has
+ * changed in a way that is incompatible with the previously compiled
+ * application.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class IllegalAccessError extends IncompatibleClassChangeError
{
- public IllegalAccessError ()
- {
- super ();
- }
-
- public IllegalAccessError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = -8988904074992417891L;
+
+ /**
+ * Create an error without a message.
+ */
+ public IllegalAccessError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public IllegalAccessError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/IllegalAccessException.java b/libjava/java/lang/IllegalAccessException.java
index d361811..af15fd2 100644
--- a/libjava/java/lang/IllegalAccessException.java
+++ b/libjava/java/lang/IllegalAccessException.java
@@ -1,32 +1,72 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* IllegalAccessException.java -- exception thrown when trying to load a
+ class that is not public and in another package.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * Thrown in two cases. The first is when try to load a class that is
+ * not public and in another package using specific methods from
+ * <code>ClassLoader</code> and <code>Class</code>. The second case is
+ * when trying to create a new instance of a class to which you do not have
+ * access to the zero argument constructor as in using the
+ * <code>newsInstance</code> method of class <code>Class</code>.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class IllegalAccessException extends Exception
{
+ static final long serialVersionUID = 6616958222490762034L;
+
+ /**
+ * Create an exception without a message.
+ */
public IllegalAccessException()
- {
- super();
- }
-
- public IllegalAccessException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public IllegalAccessException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/IllegalArgumentException.java b/libjava/java/lang/IllegalArgumentException.java
index 935092b..7d2d547 100644
--- a/libjava/java/lang/IllegalArgumentException.java
+++ b/libjava/java/lang/IllegalArgumentException.java
@@ -1,32 +1,67 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* IllegalArgumentException.java -- exception may be thrown when a method
+ is passed an illegal or inappropriate argument.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * When a method is passed an illegal or inappropriate argument
+ * this exception may be thrown.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class IllegalArgumentException extends RuntimeException
{
+ static final long serialVersionUID = -5365630128856068164L;
+
+ /**
+ * Create an exception without a message.
+ */
public IllegalArgumentException()
- {
- super();
- }
-
- public IllegalArgumentException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public IllegalArgumentException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/IllegalMonitorStateException.java b/libjava/java/lang/IllegalMonitorStateException.java
index 32b50f4..dcaa765 100644
--- a/libjava/java/lang/IllegalMonitorStateException.java
+++ b/libjava/java/lang/IllegalMonitorStateException.java
@@ -1,32 +1,70 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* IllegalMonitorStateException.java -- exception thrown when a thread
+ attempts to wait on an object's monitor.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * If a thread attempts to wait on an object's monitor then
+ * <code>IllegalMonitorStateException</code> can be thrown. This
+ * exception is also thrown to give a message to other threads also waiting
+ * on an object's monitor without owning the monitor.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class IllegalMonitorStateException extends RuntimeException
{
+ static final long serialVersionUID = 3713306369498869069L;
+
+ /**
+ * Create an exception without a message.
+ */
public IllegalMonitorStateException()
- {
- super();
- }
-
- public IllegalMonitorStateException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public IllegalMonitorStateException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/IllegalStateException.java b/libjava/java/lang/IllegalStateException.java
index 90abb52..1f154c0 100644
--- a/libjava/java/lang/IllegalStateException.java
+++ b/libjava/java/lang/IllegalStateException.java
@@ -1,32 +1,68 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* IllegalStateException.java -- exception thrown when invoking a method at
+ an illegal or inappropriate time.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * Invoking a method at an illegal or inappropriate time can result
+ * in an <code>IllegalStateException</code>.
+ *
+ * @since JDK 1.1
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class IllegalStateException extends RuntimeException
{
+ static final long serialVersionUID = -1848914673093119416L;
+
+ /**
+ * Create an exception without a message.
+ */
public IllegalStateException()
- {
- super();
- }
-
- public IllegalStateException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public IllegalStateException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/IllegalThreadStateException.java b/libjava/java/lang/IllegalThreadStateException.java
index f6b6392..7b4693e 100644
--- a/libjava/java/lang/IllegalThreadStateException.java
+++ b/libjava/java/lang/IllegalThreadStateException.java
@@ -1,32 +1,69 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* IllegalThreadStateException.java -- exception thrown when trying to
+ suspend or resume an object of class Thread when it is not in an
+ appropriate state for the operation.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * When trying to <code>suspend</code> or <code>resume</code> an object
+ * of class <code>Thread</code> when it is not in an appropriate state
+ * for the operation.
+ *
+ * @since JDK 1.0
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class IllegalThreadStateException extends IllegalArgumentException
{
+ static final long serialVersionUID = -7626246362397460174L;
+
+ /**
+ * Create an exception without a message.
+ */
public IllegalThreadStateException()
- {
- super();
- }
-
- public IllegalThreadStateException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public IllegalThreadStateException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/IncompatibleClassChangeError.java b/libjava/java/lang/IncompatibleClassChangeError.java
index 1477732..5a06b9a 100644
--- a/libjava/java/lang/IncompatibleClassChangeError.java
+++ b/libjava/java/lang/IncompatibleClassChangeError.java
@@ -1,34 +1,66 @@
-// IncompatibleClassChangeError.java
+/* IncompatibleClassChangeError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
+ * Status: Believed complete and correct.
*/
+/**
+ * An <code>IncompatibleClassChangeError</code> is thrown when the
+ * definition of a class used by the currently executing method has
+ * changed in an incompatible way.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class IncompatibleClassChangeError extends LinkageError
{
- public IncompatibleClassChangeError ()
- {
- super ();
- }
-
- public IncompatibleClassChangeError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = -4914975503642802119L;
+
+ /**
+ * Create an error without a message.
+ */
+ public IncompatibleClassChangeError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public IncompatibleClassChangeError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/IndexOutOfBoundsException.java b/libjava/java/lang/IndexOutOfBoundsException.java
index f117525..8ad8844 100644
--- a/libjava/java/lang/IndexOutOfBoundsException.java
+++ b/libjava/java/lang/IndexOutOfBoundsException.java
@@ -1,32 +1,72 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* IndexOutOfBoundsException.java -- exception thrown when attempting to
+ access an index which is out of bounds on objects like String, Array,
+ or Vector.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * This exception can be thrown to indicate an attempt to access an
+ * index which is out of bounds on objects like String, Array, or Vector.
+ * Usually any negative integer less than or equal to -1 and positive
+ * integer greater than or equal to the size of the object is an index
+ * which would be out of bounds.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class IndexOutOfBoundsException extends RuntimeException
{
+ static final long serialVersionUID = 234122996006267687L;
+
+ /**
+ * Create an exception without a message.
+ */
public IndexOutOfBoundsException()
- {
- super();
- }
-
- public IndexOutOfBoundsException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public IndexOutOfBoundsException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/InstantiationError.java b/libjava/java/lang/InstantiationError.java
index 595abaf..788fac5 100644
--- a/libjava/java/lang/InstantiationError.java
+++ b/libjava/java/lang/InstantiationError.java
@@ -1,34 +1,69 @@
-// InstantiationError.java
+/* InstantiationError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
+ * Status: Believed complete and correct.
*/
+/**
+ * An <code>InstantiationError</code> is thrown when an attempt is made to
+ * create an instance of an abstract class or an interface. Because this
+ * error is usually caught by a compiler,
+ * the error only occurs at runtime when the definition of a class has
+ * changed in a way that is incompatible with the previously compiled
+ * application.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class InstantiationError extends IncompatibleClassChangeError
{
- public InstantiationError ()
- {
- super ();
- }
-
- public InstantiationError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = -4885810657349421204L;
+
+ /**
+ * Create an error without a message.
+ */
+ public InstantiationError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public InstantiationError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/InstantiationException.java b/libjava/java/lang/InstantiationException.java
index 1ea91ba..19237d7 100644
--- a/libjava/java/lang/InstantiationException.java
+++ b/libjava/java/lang/InstantiationException.java
@@ -1,32 +1,69 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* InstantiationException.java -- exception thrown when trying to instantiate
+ interfaces and abstract classes using the newInstance method of class Class.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * Interfaces and abstract classes cannot be instantiated using the
+ * <code>newInstance</code> method of class <code>Class</code>. Trying
+ * to do so results in this exception being thrown.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class InstantiationException extends Exception
{
+ static final long serialVersionUID = -8441929162975509110L;
+
+ /**
+ * Create an exception without a message.
+ */
public InstantiationException()
- {
- super();
- }
-
- public InstantiationException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public InstantiationException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/InternalError.java b/libjava/java/lang/InternalError.java
index e8e9755..379d465 100644
--- a/libjava/java/lang/InternalError.java
+++ b/libjava/java/lang/InternalError.java
@@ -1,34 +1,65 @@
-// InternalError.java
+/* InternalError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
+ * Status: Believed complete and correct.
*/
+/**
+ * An <code>InternalError</code> is thrown when a mystical error has
+ * occurred in the Java Virtual Machine.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class InternalError extends VirtualMachineError
{
- public InternalError ()
- {
- super ();
- }
-
- public InternalError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = -9062593416125562365L;
+
+ /**
+ * Create an error without a message.
+ */
+ public InternalError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public InternalError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/InterruptedException.java b/libjava/java/lang/InterruptedException.java
index adb73c2..ca55fa6 100644
--- a/libjava/java/lang/InterruptedException.java
+++ b/libjava/java/lang/InterruptedException.java
@@ -1,32 +1,70 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* InterruptedException.java -- exception thrown when a thread interrupts
+ another thread which was previously sleeping, waiting, or paused in some
+ other way.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * Thrown when a thread interrupts another thread which was previously
+ * sleeping, waiting, or paused in some other way. See the
+ * <code>interrupt</code> method of class <code>Thread</code>.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class InterruptedException extends Exception
{
+ static final long serialVersionUID = 6700697376100628473L;
+
+ /**
+ * Create an exception without a message.
+ */
public InterruptedException()
- {
- super();
- }
-
- public InterruptedException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public InterruptedException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/LinkageError.java b/libjava/java/lang/LinkageError.java
index af380ca..8de9dd2 100644
--- a/libjava/java/lang/LinkageError.java
+++ b/libjava/java/lang/LinkageError.java
@@ -1,34 +1,66 @@
-// LinkageError.java
+/* LinkageError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
+ * Status: Believed complete and correct.
*/
+/**
+ * Subclasses of <code>LinkageError</code> are thrown to indicate
+ * a class which is depended upon by another class has incompatibly
+ * changed after the compilation of the latter class.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class LinkageError extends Error
{
- public LinkageError ()
- {
- super ();
- }
-
- public LinkageError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = 3579600108157160122L;
+
+ /**
+ * Create an error without a message.
+ */
+ public LinkageError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public LinkageError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/NegativeArraySizeException.java b/libjava/java/lang/NegativeArraySizeException.java
index 22f1423..8af136e 100644
--- a/libjava/java/lang/NegativeArraySizeException.java
+++ b/libjava/java/lang/NegativeArraySizeException.java
@@ -1,32 +1,68 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* NegativeArraySizeException.java -- exception thrown when an attempt is
+ made to create an array with a negative size.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * Thrown when an attempt is made to create an array with a negative
+ * size.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class NegativeArraySizeException extends RuntimeException
{
+ static final long serialVersionUID = -8960118058596991861L;
+
+ /**
+ * Create an exception without a message.
+ */
public NegativeArraySizeException()
- {
- super();
- }
-
- public NegativeArraySizeException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public NegativeArraySizeException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/NoClassDefFoundError.java b/libjava/java/lang/NoClassDefFoundError.java
index afb3abb..9c123c0 100644
--- a/libjava/java/lang/NoClassDefFoundError.java
+++ b/libjava/java/lang/NoClassDefFoundError.java
@@ -1,34 +1,69 @@
-// NoClassDefFoundError.java
+/* NoClassDefFoundError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
+ * Status: Believed complete and correct.
*/
+/**
+ * A <code>NoClassDefFoundError</code> is thrown when a classloader or the
+ * Java Virtual Machine tries to load a class and no definition of the class
+ * can be found. This could happen when using the <code>new</code> expression
+ * or during a normal method call. The reason this would occur at runtime is
+ * because the missing class definition existed when the currently executing
+ * class was compiled, but now that definition cannot be found.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class NoClassDefFoundError extends LinkageError
{
- public NoClassDefFoundError ()
- {
- super ();
- }
-
- public NoClassDefFoundError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = 9095859863287012458L;
+
+ /**
+ * Create an error without a message.
+ */
+ public NoClassDefFoundError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public NoClassDefFoundError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/NoSuchFieldError.java b/libjava/java/lang/NoSuchFieldError.java
index 7835ebd..22cac1f 100644
--- a/libjava/java/lang/NoSuchFieldError.java
+++ b/libjava/java/lang/NoSuchFieldError.java
@@ -1,34 +1,66 @@
-// NoSuchFieldError.java
+/* NoSuchFieldError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
+ * Status: Believed complete and correct.
*/
+/**
+ * A <code>NoSuchFieldError</code> is thrown if an application attempts
+ * to access the field of an object and that object no longer has that
+ * field.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class NoSuchFieldError extends IncompatibleClassChangeError
{
- public NoSuchFieldError ()
- {
- super ();
- }
-
- public NoSuchFieldError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = -3456430195886129035L;
+
+ /**
+ * Create an error without a message.
+ */
+ public NoSuchFieldError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public NoSuchFieldError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/NoSuchFieldException.java b/libjava/java/lang/NoSuchFieldException.java
index 1c959fa..e01eff7 100644
--- a/libjava/java/lang/NoSuchFieldException.java
+++ b/libjava/java/lang/NoSuchFieldException.java
@@ -1,32 +1,67 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* NoSuchFieldException.java -- exception thrown to indicate the class does
+ not have the specified field.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * Thrown to indicate the class does not have the specified field.
+ *
+ * @since JDK 1.1
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class NoSuchFieldException extends Exception
{
+ static final long serialVersionUID = -6143714805279938260L;
+
+ /**
+ * Create an exception without a message.
+ */
public NoSuchFieldException()
- {
- super();
- }
-
- public NoSuchFieldException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public NoSuchFieldException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/NoSuchMethodError.java b/libjava/java/lang/NoSuchMethodError.java
index c266e2e..d169b51 100644
--- a/libjava/java/lang/NoSuchMethodError.java
+++ b/libjava/java/lang/NoSuchMethodError.java
@@ -1,34 +1,66 @@
-// NoSuchMethodError.java
+/* NoSuchMethodError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
+ * Status: Believed complete and correct.
*/
+/**
+ * A <code>NoSuchMethodError</code> is thrown if an application attempts
+ * to access a method of a class, and that class no longer has that
+ * method.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class NoSuchMethodError extends IncompatibleClassChangeError
{
- public NoSuchMethodError ()
- {
- super ();
- }
-
- public NoSuchMethodError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = -3765521442372831335L;
+
+ /**
+ * Create an error without a message.
+ */
+ public NoSuchMethodError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public NoSuchMethodError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/NoSuchMethodException.java b/libjava/java/lang/NoSuchMethodException.java
index 87e2132..b4b19fa 100644
--- a/libjava/java/lang/NoSuchMethodException.java
+++ b/libjava/java/lang/NoSuchMethodException.java
@@ -1,32 +1,67 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* NoSuchMethodException.java -- exception thrown to indicate the class
+ does not have the specified method.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * Thrown to indicate the class does not have the specified method.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class NoSuchMethodException extends Exception
{
+ static final long serialVersionUID = 5034388446362600923L;
+
+ /**
+ * Create an exception without a message.
+ */
public NoSuchMethodException()
- {
- super();
- }
-
- public NoSuchMethodException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public NoSuchMethodException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/NullPointerException.java b/libjava/java/lang/NullPointerException.java
index f4b2757..6ba13f5 100644
--- a/libjava/java/lang/NullPointerException.java
+++ b/libjava/java/lang/NullPointerException.java
@@ -1,32 +1,68 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* NullPointerException.java -- exception thrown when attempting to use null
+ where an object is required.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * Thrown when attempting to use <code>null</code> where an object
+ * is required, such as when accessing an instance method of a null object.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class NullPointerException extends RuntimeException
{
+ static final long serialVersionUID = 5162710183389028792L;
+
+ /**
+ * Create an exception without a message.
+ */
public NullPointerException()
- {
- super();
- }
-
- public NullPointerException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public NullPointerException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/NumberFormatException.java b/libjava/java/lang/NumberFormatException.java
index 1b97c75..5978f7e 100644
--- a/libjava/java/lang/NumberFormatException.java
+++ b/libjava/java/lang/NumberFormatException.java
@@ -1,32 +1,69 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* NumberFormatException.java -- exception may be thrown when attempting to
+ convert a String to one of the numeric types, but the operation fails.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * Can be thrown when attempting to convert a <code>String</code> to
+ * one of the numeric types, but the operation fails because the string
+ * has the wrong format.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class NumberFormatException extends IllegalArgumentException
{
+ static final long serialVersionUID = -2848938806368998894L;
+
+ /**
+ * Create an exception without a message.
+ */
public NumberFormatException()
- {
- super();
- }
-
- public NumberFormatException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public NumberFormatException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/OutOfMemoryError.java b/libjava/java/lang/OutOfMemoryError.java
index 81ab753..69693e9 100644
--- a/libjava/java/lang/OutOfMemoryError.java
+++ b/libjava/java/lang/OutOfMemoryError.java
@@ -1,34 +1,66 @@
-// OutOfMemoryError.java
+/* OutOfMemoryError.java
+ 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 October 1, 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.
+ * Status: Believed complete and correct.
*/
+/**
+ * When the Java Virtual Machine is unable to allocate an object because it
+ * is out of memory and no more memory could be made available by the
+ * garbage collector an <code>OutOfMemoryError</code> is thrown.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class OutOfMemoryError extends VirtualMachineError
{
- public OutOfMemoryError ()
- {
- super ();
- }
-
- public OutOfMemoryError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = 8228564086184010517L;
+
+ /**
+ * Create an error without a message.
+ */
+ public OutOfMemoryError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public OutOfMemoryError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/RuntimeException.java b/libjava/java/lang/RuntimeException.java
index 2d71ae6..c3960dc 100644
--- a/libjava/java/lang/RuntimeException.java
+++ b/libjava/java/lang/RuntimeException.java
@@ -1,32 +1,70 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* RuntimeException.java -- all exceptions which are subclasses of this class
+ can be thrown at any time during the execution of a Java virtual machine.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * All exceptions which are subclasses of <code>RuntimeException</code>
+ * can be thrown at any time during the execution of a Java virtual machine.
+ * Methods which throw these exceptions are not required to declare them
+ * in their throws clause.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class RuntimeException extends Exception
{
+ static final long serialVersionUID = -7034897190745766939L;
+
+ /**
+ * Create an exception without a message.
+ */
public RuntimeException()
- {
- super();
- }
-
- public RuntimeException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public RuntimeException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/SecurityException.java b/libjava/java/lang/SecurityException.java
index d481e29..25db424 100644
--- a/libjava/java/lang/SecurityException.java
+++ b/libjava/java/lang/SecurityException.java
@@ -1,31 +1,68 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* SecurityException.java -- exception thrown to indicate a security
+ violation.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * The security manager will throw this exception to indicate a security
+ * violation.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class SecurityException extends RuntimeException
{
+ static final long serialVersionUID = 6878364983674394167L;
+
+ /**
+ * Create an exception without a message.
+ */
public SecurityException()
- {
- super();
- }
-
- public SecurityException(String msg)
- {
- super(msg);
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public SecurityException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/SecurityManager.java b/libjava/java/lang/SecurityManager.java
index 9c14552..345bb22 100644
--- a/libjava/java/lang/SecurityManager.java
+++ b/libjava/java/lang/SecurityManager.java
@@ -1,268 +1,765 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* java.lang.SecurityManager
+ 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. */
-// SecurityManager
package java.lang;
+import java.net.*;
+import java.util.*;
+import java.io.*;
+
/**
- * @author Anthony Green <green@cygnus.com>
- * @date October 5, 1998.
- */
+ ** SecurityManager is a class you can extend to create
+ ** your own Java security policy. By default, there is
+ ** no SecurityManager installed in 1.1, which means that
+ ** all things are permitted to all people.<P>
+ **
+ ** The default methods in this class deny all
+ ** things to all people.
+ **
+ ** @author John Keiser
+ ** @version 1.1.0, 31 May 1998
+ ** @since JDK1.0
+ **/
+public class SecurityManager {
+ /** Tells whether or not the SecurityManager is currently
+ ** performing a security check.
+ **/
+ protected boolean inCheck;
+
+ /** Tells whether or not the SecurityManager is currently
+ ** performing a security check.
+ **
+ ** @return whether or not the SecurityManager is
+ ** currently performing a security check.
+ **/
+ public boolean getInCheck() {
+ return inCheck;
+ }
-/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
- */
+ /** Get a list of all the classes currently executing
+ ** methods on the Java stack. getClassContext()[0] is
+ ** the currently executing method
+ ** <STRONG>Spec Note:</STRONG> does not say whether
+ ** the stack will include the getClassContext() call or
+ ** the one just before it.
+ **
+ ** @return an array containing all the methods on classes
+ ** on the Java execution stack.
+ **/
+ protected Class[] getClassContext() {
+ return VMSecurityManager.getClassContext();
+ }
-import java.io.*;
-import java.net.*;
+ /** Find the ClassLoader for the most recent class on the
+ ** stack that was loaded by an explicit ClassLoader. If
+ ** everything on the stack was loaded by the system
+ ** classloader, null is returned.
+ **
+ ** @return the most recent ClassLoader on the execution
+ ** stack.
+ **/
+ protected ClassLoader currentClassLoader() {
+ return VMSecurityManager.currentClassLoader();
+ }
+
+ /** Find the most recent class on the stack that was
+ ** loaded by an explicit ClassLoader. If everything on
+ ** the stack was loaded by the system classloader, null
+ ** is returned.
+ **
+ ** @return the most recent loaded Class on the execution
+ ** stack.
+ **/
+ protected Class currentLoadedClass() {
+ Class[] c = getClassContext();
+ for(int i=0;i<c.length;i++) {
+ if(c[i].getClassLoader() != null) {
+ return c[i];
+ }
+ }
+ return null;
+ }
+
+ /** Get the depth on the execution stack of the most
+ ** recent class that was loaded by an explicit
+ ** ClassLoader. This can be used as an index into
+ ** getClassContext().
+ **
+ ** @return the index of the most recent loaded Class on
+ ** the execution stack.
+ **/
+ protected int classLoaderDepth() {
+ Class[] c = getClassContext();
+ for(int i=0;i<c.length;i++) {
+ if(c[i].getClassLoader() != null) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ /** Tell whether there is a class loaded with an explicit
+ ** ClassLoader on the stack.
+ **
+ ** @return whether there is a class loaded with an
+ ** explicit ClassLoader on the stack.
+ **/
+ protected boolean inClassLoader() {
+ return classLoaderDepth() != -1;
+ }
+
+
+ /** Get the depth of a particular class on the execution
+ ** stack.
+ **
+ ** @param className the fully-qualified name of the class
+ ** to search for on the stack.
+ ** @return the index of the class on the stack, or -1 if
+ ** the class is not on the stack.
+ **/
+ protected int classDepth(String className) {
+ Class[] c = getClassContext();
+ for(int i=0;i<c.length;i++) {
+ if(className.equals(c[i].getName())) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ /** Tell whether the specified class is on the execution
+ ** stack.
+ **
+ ** @param className the fully-qualified name of the class
+ ** to search for on the stack.
+ ** @return whether the specified class is on the
+ ** execution stack.
+ **/
+ protected boolean inClass(String className) {
+ return classDepth(className) != -1;
+ }
+
+ /** Get an implementation-dependent Object that contains
+ ** enough information about the current environment to be
+ ** able to perform standard security checks later. This
+ ** is used by trusted methods that need to verify that
+ ** their callers have sufficient access to perform
+ ** certain operations.<P>
+ **
+ ** Currently the only methods that use this are checkRead()
+ ** and checkConnect().
+ **
+ ** @see checkConnect(java.lang.String,int,java.lang.Object)
+ ** @see checkRead(java.lang.String,java.lang.Object)
+ **/
+ public Object getSecurityContext() {
+ return new SecurityContext(getClassContext());
+ }
-public abstract class SecurityManager
-{
- protected boolean inCheck = false;
-
- public void checkAccept (String host, int port)
- {
- throw new SecurityException();
- }
-
- public void checkAccess (Thread thrd)
- {
- throw new SecurityException();
- }
-
- public void checkAccess (ThreadGroup thrdGroup)
- {
- throw new SecurityException();
- }
-
- public void checkAwtEventQueueAccess ()
- {
- throw new SecurityException();
- }
-
- public void checkConnect (String host, int prt)
- {
- throw new SecurityException();
- }
-
- public void checkConnect (String host, int prt, Object ctx)
- {
- throw new SecurityException();
- }
-
- public void checkCreateClassLoader ()
- {
- throw new SecurityException();
- }
-
- public void checkDelete (String fileName)
- {
- throw new SecurityException();
- }
-
- public void checkExec (String prog)
- {
- throw new SecurityException();
- }
-
- public void checkExit (int stat)
- {
- throw new SecurityException();
- }
-
- public void checkLink (String lib)
- {
- throw new SecurityException();
- }
-
- public void checkListen (int lport)
- {
- throw new SecurityException();
- }
-
- public void checkMemberAccess (Class cl, int mtype)
- {
- throw new SecurityException();
- }
-
- public void checkMulticast (InetAddress maddr)
- {
- throw new SecurityException();
- }
-
- public void checkMulticast (InetAddress maddr, byte ttl)
- {
- throw new SecurityException();
- }
-
- public void checkPackageAccess (String pkg)
- {
- throw new SecurityException();
- }
-
- public void checkPackageDefinition (String pkg)
- {
- throw new SecurityException();
- }
-
- public void checkPermission (java.security.Permission perm)
- {
- throw new SecurityException();
- }
-
- public void checkPrintJobAccess ()
- {
- throw new SecurityException();
- }
-
- public void checkPropertiesAccess ()
- {
- throw new SecurityException();
- }
-
- public void checkPropertyAccess (String prop)
- {
- throw new SecurityException();
- }
-
- public void checkPropertyAccess (String prop, String defval)
- {
- throw new SecurityException();
- }
-
- public void checkRead (FileDescriptor fd)
- {
- throw new SecurityException();
- }
-
- public void checkRead (String fileName)
- {
- throw new SecurityException();
- }
-
- public void checkRead (String fileName, Object ctx)
- {
- throw new SecurityException();
- }
-
- public void checkSecurityAccess (String action)
- {
- throw new SecurityException();
- }
-
- public void checkSetFactory ()
- {
- throw new SecurityException();
- }
-
- public void checkSystemClipboardAccess ()
- {
- throw new SecurityException();
- }
-
- public boolean checkTopLevelWindow (Object window)
- {
- throw new SecurityException();
- }
-
- public void checkWrite (FileDescriptor fd)
- {
- throw new SecurityException();
- }
-
- public void checkWrite (String fileName)
- {
- throw new SecurityException();
- }
-
- // Note: this method is deprecated in JDK 1.2
- protected /* native */ int classDepth (String className)
- {
- Class[] classStack = getClassContext ();
- for (int i = 0; i < classStack.length; i++)
- if (classStack[i].getName().compareTo(className) == 0)
- return i;
-
- return -1;
- }
-
- // Note: this method is deprecated in JDK 1.2
- protected /* native */ int classLoaderDepth ()
- {
- Class[] classStack = getClassContext ();
- for (int i = 0; i < classStack.length; i++)
- if (classStack[i].getClassLoader() != null)
- return i;
-
- return -1;
- }
-
- protected /* native */ ClassLoader currentClassLoader ()
- {
- Class[] classStack = getClassContext ();
- for (int i = 0; i < classStack.length; i++)
- {
- ClassLoader loader = classStack[i].getClassLoader();
- if (loader != null)
- return loader;
- }
-
- return null;
- }
-
- protected /* native */ Class currentLoadedClass ()
- {
- Class[] classStack = getClassContext ();
- for (int i = 0; i < classStack.length; i++)
- {
- ClassLoader loader = classStack[i].getClassLoader();
- if (loader != null)
- return classStack[i];
- }
-
- return null;
- }
-
- protected /* native */ Class[] getClassContext ()
- {
- return new Class[0];
- }
-
- // Note: this method is deprecated in JDK 1.2
- public boolean getInCheck ()
- {
- return inCheck;
- }
-
- public Object getSecurityContext ()
- {
- // FIXME: This has yet to be implemented.
- return new String("");
- }
-
- public ThreadGroup getThreadGroup ()
- {
- return Thread.currentThread().getThreadGroup();
- }
-
- protected boolean inClass (String className)
- {
- return (classDepth (className) != -1);
- }
-
- protected boolean inClassLoader ()
- {
- return (classLoaderDepth () != -1);
- }
-
- protected SecurityManager ()
- {
- if (System.getSecurityManager () != null)
- throw new SecurityException ();
- }
+ /** Check if the current thread is allowed to create a
+ ** ClassLoader.<P>
+ **
+ ** This method is called from ClassLoader.ClassLoader(),
+ ** in other words, whenever a ClassLoader is created.<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.lang.ClassLoader#ClassLoader()
+ **/
+ public void checkCreateClassLoader() {
+ throw new SecurityException("Cannot create new ClassLoaders.");
+ }
+
+ /** Check if the current thread is allowed to modify this
+ ** other Thread.<P>
+ **
+ ** Called by Thread.stop(), suspend(), resume(), and
+ ** interrupt(), destroy(), setPriority(), setName() and
+ ** setDaemon().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param g the Thread to check against
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.lang.Thread#stop()
+ ** @see java.lang.Thread#suspend()
+ ** @see java.lang.Thread#resume()
+ ** @see java.lang.Thread#interrupt()
+ ** @see java.lang.Thread#destroy()
+ ** @see java.lang.Thread#setPriority(int)
+ ** @see java.lang.Thread#setName(java.lang.String)
+ ** @see java.lang.Thread#setDaemon(boolean)
+ **/
+ public void checkAccess(Thread t) {
+ throw new SecurityException("Cannot modify Threads.");
+ }
+
+ /** Check if the current thread is allowed to modify this
+ ** ThreadGroup.<P>
+ **
+ ** Called by Thread.Thread() (to add a thread to the
+ ** ThreadGroup), ThreadGroup.ThreadGroup() (to add this
+ ** ThreadGroup to a parent), ThreadGroup.stop(),
+ ** suspend(), resume(), interrupt(), destroy(),
+ ** setDaemon(), and setMaxPriority().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param g the ThreadGroup to check against
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.lang.Thread#Thread()
+ ** @see java.lang.ThreadGroup#ThreadGroup()
+ ** @see java.lang.ThreadGroup#stop()
+ ** @see java.lang.ThreadGroup#suspend()
+ ** @see java.lang.ThreadGroup#resume()
+ ** @see java.lang.ThreadGroup#interrupt()
+ ** @see java.lang.ThreadGroup#setDaemon(boolean)
+ ** @see java.lang.ThreadGroup#setMaxPriority(int)
+ **/
+ public void checkAccess(ThreadGroup g) {
+ throw new SecurityException("Cannot modify ThreadGroups.");
+ }
+
+ /** Check if the current thread is allowed to exit the
+ ** JVM with the given status.<P>
+ **
+ ** This method is called from Runtime.exit().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param status the status to exit with
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.lang.Runtime#exit()
+ ** @see java.lang.Runtime#exit(int)
+ **/
+ public void checkExit(int status) {
+ throw new SecurityException("Cannot exit JVM.");
+ }
+
+ /** Check if the current thread is allowed to execute the
+ ** given program.<P>
+ **
+ ** This method is called from Runtime.exec().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param program the name of the program to exec
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.lang.Runtime#exec(java.lang.String[],java.lang.String[])
+ **/
+ public void checkExec(String program) {
+ throw new SecurityException("Cannot execute programs.");
+ }
+
+ /** Check if the current thread is allowed to link in the
+ ** given native library.<P>
+ **
+ ** This method is called from Runtime.load() (and hence,
+ ** by loadLibrary() as well).<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param filename the full name of the library to load
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.lang.Runtime#load(java.lang.String)
+ **/
+ public void checkLink(String filename) {
+ throw new SecurityException("Cannot link native libraries.");
+ }
+
+ /** Check if the current thread is allowed to read the
+ ** given file using the FileDescriptor.<P>
+ **
+ ** This method is called from
+ ** FileInputStream.FileInputStream().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param desc the FileDescriptor representing the file
+ ** to access
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.io.FileInputStream#FileInputStream(java.io.FileDescriptor)
+ **/
+ public void checkRead(FileDescriptor desc) {
+ throw new SecurityException("Cannot read files via file descriptors.");
+ }
+
+ /** Check if the current thread is allowed to read the
+ ** given file.<P>
+ **
+ ** This method is called from
+ ** FileInputStream.FileInputStream(),
+ ** RandomAccessFile.RandomAccessFile(), File.exists(),
+ ** canRead(), isFile(), isDirectory(), lastModified(),
+ ** length() and list().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param filename the full name of the file to access
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.io.File
+ ** @see java.io.FileInputStream#FileInputStream(java.lang.String)
+ ** @see java.io.RandomAccessFile#RandomAccessFile(java.lang.String)
+ **/
+ public void checkRead(String filename) {
+ throw new SecurityException("Cannot read files via file names.");
+ }
+
+ /** Check if the current thread is allowed to read the
+ ** given file. using the given SecurityContext.<P>
+ **
+ ** I know of no core class that calls this method.<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param filename the full name of the file to access
+ ** @param securityContext the Security Context to
+ ** determine access for.
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ **/
+ public void checkRead(String filename, Object securityContext) {
+ throw new SecurityException("Cannot read files via file names.");
+ }
+
+ /** Check if the current thread is allowed to write to the
+ ** given file using the FileDescriptor.<P>
+ **
+ ** This method is called from
+ ** FileOutputStream.FileOutputStream().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param desc the FileDescriptor representing the file
+ ** to access
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.io.FileOutputStream#FileOutputStream(java.io.FileDescriptor)
+ **/
+ public void checkWrite(FileDescriptor desc) {
+ throw new SecurityException("Cannot write files via file descriptors.");
+ }
+
+ /** Check if the current thread is allowed to write to the
+ ** given file.<P>
+ **
+ ** This method is called from
+ ** FileOutputStream.FileOutputStream(),
+ ** RandomAccessFile.RandomAccessFile(),
+ ** File.canWrite(), mkdir(), and renameTo().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param filename the full name of the file to access
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.io.File#canWrite()
+ ** @see java.io.File#mkdir()
+ ** @see java.io.File#renameTo()
+ ** @see java.io.FileOutputStream#FileOutputStream(java.lang.String)
+ ** @see java.io.RandomAccessFile#RandomAccessFile(java.lang.String)
+ **/
+ public void checkWrite(String filename) {
+ throw new SecurityException("Cannot write files via file names.");
+ }
+
+ /** Check if the current thread is allowed to delete the
+ ** given file.<P>
+ **
+ ** This method is called from File.delete().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param filename the full name of the file to delete
+ ** @exception SecurityException if th operation is not
+ ** permitted.
+ ** @see java.io.File#delete()
+ **/
+ public void checkDelete(String filename) {
+ throw new SecurityException("Cannot delete files.");
+ }
+
+ /** Check if the current thread is allowed to connect to a
+ ** given host on a given port.<P>
+ **
+ ** This method is called from Socket.Socket().
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param host the host to connect to
+ ** @param port the port to connect on
+ ** @exception SecurityException if the operation is not
+ ** permitted
+ ** @see java.net.Socket#Socket()
+ **/
+ public void checkConnect(String host, int port) {
+ throw new SecurityException("Cannot make network connections.");
+ }
+
+ /** Check if the current thread is allowed to connect to a
+ ** given host on a given port using a specific security
+ ** context to determine access.<P>
+ **
+ ** This method is not called in the 1.1 core classes.<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param host the host to connect to
+ ** @param port the port to connect on
+ ** @param securityContext the security context to
+ ** determine access with
+ ** @exception SecurityException if the operation is not
+ ** permitted
+ **/
+ public void checkConnect(String host, int port, Object securityContext) {
+ throw new SecurityException("Cannot make network connections.");
+ }
+
+ /** Check if the current thread is allowed to listen to a
+ ** specific port for data.<P>
+ **
+ ** This method is called by ServerSocket.ServerSocket().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param port the port to listen on
+ ** @exception SecurityException if the operation is not
+ ** permitted
+ ** @see java.net.ServerSocket#ServerSocket(int)
+ **/
+ public void checkListen(int port) {
+ throw new SecurityException("Cannot listen for connections.");
+ }
+
+ /** Check if the current thread is allowed to accept a
+ ** connection from a particular host on a particular
+ ** port.<P>
+ **
+ ** This method is called by ServerSocket.implAccept().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param host the host which wishes to connect
+ ** @param port the port the connection will be on
+ ** @exception SecurityException if the operation is not
+ ** permitted
+ ** @see java.net.ServerSocket#accept()
+ **/
+ public void checkAccept(String host, int port) {
+ throw new SecurityException("Cannot accept connections.");
+ }
+
+ /** Check if the current thread is allowed to read and
+ ** write multicast to a particular address.<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @XXX where is it called?
+ **
+ ** @param addr the address to multicast to.
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ **/
+ public void checkMulticast(InetAddress addr) {
+ throw new SecurityException("Cannot read or write multicast.");
+ }
+
+ /** Check if the current thread is allowed to read and
+ ** write multicast to a particular address with a
+ ** particular ttl value.<P>
+ **
+ ** SecurityManager's implementation always denies access.<P>
+ **
+ ** @XXX where is it called?
+ **
+ ** @XXX what the hell is ttl? Expand abbreviation.
+ **
+ ** @param addr the address to multicast to.
+ ** @param ttl the ttl value to use
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ **/
+ public void checkMulticast(InetAddress addr, byte ttl) {
+ throw new SecurityException("Cannot read or write multicast.");
+ }
+
+ /**
+ ** Check if the current thread is allowed to perform an
+ ** operation that requires the specified <code>Permission</code>.
+ **
+ ** @param perm The <code>Permission</code> required.
+ ** @exception SecurityException If the operation is not allowed.
+ **/
+ public void checkPermission(java.security.Permission perm) {
+ throw new SecurityException("Operation not allowed");
+ }
+
+ /**
+ ** Check if the current thread is allowed to perform an
+ ** operation that requires the specified <code>Permission</code>.
+ **
+ ** @param perm The <code>Permission</code> required.
+ ** @param context A security context
+ ** @exception SecurityException If the operation is not allowed.
+ ** @since 1.2
+ **/
+ public void checkPermission(java.security.Permission perm,
+ Object context) {
+ throw new SecurityException("Operation not allowed");
+ }
+
+ /** Check if the current thread is allowed to read or
+ ** write all the system properties at once.<P>
+ **
+ ** This method is called by System.getProperties()
+ ** and setProperties().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.lang.System#getProperties()
+ ** @see java.lang.System#setProperties(java.util.Properties)
+ **/
+ public void checkPropertiesAccess() {
+ throw new SecurityException("Cannot access all system properties at once.");
+ }
+
+ /** Check if the current thread is allowed to read or
+ ** write a particular system property.<P>
+ **
+ ** This method is called by System.getProperty() and
+ ** setProperty().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @exception SecurityException is the operation is not
+ ** permitted.
+ ** @see java.lang.System#getProperty(java.lang.String)
+ ** @see java.lang.System#setProperty(java.lang.String,java.lang.String)
+ **/
+ public void checkPropertyAccess(String name) {
+ throw new SecurityException("Cannot access individual system properties.");
+ }
+
+ /** Check if the current thread is allowed to create a
+ ** top-level window. If it is not, the operation should
+ ** still go through, but some sort of nonremovable
+ ** warning should be placed on the window to show that it
+ ** is untrusted.<P>
+ **
+ ** This method is called by Window.Window().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param window the window to create
+ ** @see java.awt.Window#Window(java.awt.Frame)
+ **/
+ public boolean checkTopLevelWindow(Object window) {
+ return false;
+ }
+
+ /** Check if the current thread is allowed to create a
+ ** print job.<P>
+ **
+ ** This method is called by Toolkit.getPrintJob(). (I
+ ** assume so, at least, it just don't say nothing about
+ ** it in the spec.)<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.awt.Toolkit.getPrintJob(java.awt.Frame,java.lang.String,java.util.Properties)
+ **/
+ public void checkPrintJobAccess() {
+ throw new SecurityException("Cannot create print jobs.");
+ }
+
+ /** Check if the current thread is allowed to use the
+ ** system clipboard.<P>
+ **
+ ** This method is called by Toolkit.getSystemClipboard().
+ ** (I assume.)<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.awt.Toolkit#getSystemClipboard()
+ **/
+ public void checkSystemClipboardAccess() {
+ throw new SecurityException("Cannot access the system clipboard.");
+ }
+
+ /** Check if the current thread is allowed to use the AWT
+ ** event queue.<P>
+ **
+ ** This method is called by Toolkit.getSystemEventQueue().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.awt.Toolkit#getSystemEventQueue()
+ **/
+ public void checkAwtEventQueueAccess() {
+ throw new SecurityException("Cannot access the AWT event queue.");
+ }
+
+ /** Check if the current thread is allowed to access the
+ ** specified package at all.<P>
+ **
+ ** This method is called by ClassLoader.loadClass() in
+ ** user-created ClassLoaders.<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param packageName the package name to check access to
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.lang.ClassLoader#loadClass(java.lang.String,boolean)
+ **/
+ public void checkPackageAccess(String packageName) {
+ throw new SecurityException("Cannot access packages via the ClassLoader.");
+ }
+
+ /** Check if the current thread is allowed to define
+ ** classes the specified package. If the class already
+ ** created, though, ClassLoader.loadClass() can still
+ ** return the Class if checkPackageAccess() checks out.<P>
+ **
+ ** This method is called by ClassLoader.loadClass() in
+ ** user-created ClassLoaders.<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param packageName the package name to check access to
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.lang.ClassLoader#loadClass(java.lang.String,boolean)
+ **/
+ public void checkPackageDefinition(String packageName) {
+ throw new SecurityException("Cannot load classes into any packages via the ClassLoader.");
+ }
+
+ /** Check if the current thread is allowed to set the
+ ** current socket factory.<P>
+ **
+ ** This method is called by Socket.setSocketImplFactory(),
+ ** ServerSocket.setSocketFactory(), and
+ ** URL.setURLStreamHandlerFactory().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
+ ** @see java.net.ServerSocket#setSocketFactory(java.net.SocketImplFactory)
+ ** @see java.net.URL#setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory)
+ **/
+ public void checkSetFactory() {
+ throw new SecurityException("Cannot set the socket factory.");
+ }
+
+ /** Check if the current thread is allowed to get certain
+ ** types of Methods, Fields and Constructors from a Class
+ ** object.<P>
+ **
+ ** This method is called by Class.getMethod[s](),
+ ** Class.getField[s](), Class.getConstructor[s],
+ ** Class.getDeclaredMethod[s](),
+ ** Class.getDeclaredField[s](), and
+ ** Class.getDeclaredConstructor[s]().<P>
+ **
+ ** SecurityManager's implementation always denies access.
+ **
+ ** @param c the Class to check
+ ** @param memberType the type of members to check
+ ** against, either Member.DECLARED or
+ ** Member.PUBLIC.
+ ** @exception SecurityException if the operation is not
+ ** permitted.
+ ** @see java.lang.Class
+ ** @see java.lang.reflect.Member#DECLARED
+ ** @see java.lang.reflect.Member#PUBLIC
+ **/
+ public void checkMemberAccess(Class c, int memberType) {
+ throw new SecurityException("Cannot access members of classes.");
+ }
+
+ /** Test whether a particular security action may be
+ ** taken.
+ ** @param action the desired action to take
+ ** @exception SecurityException if the action is denied.
+ ** @XXX I have no idea what actions must be tested
+ ** or where.
+ **/
+ public void checkSecurityAccess(String action) {
+ checkPermission (new java.security.SecurityPermission (action));
+ }
+
+ /** Get the ThreadGroup that a new Thread should belong
+ ** to by default.<P>
+ **
+ ** Called by Thread.Thread().<P>
+ **
+ ** SecurityManager's implementation just uses the
+ ** ThreadGroup of the current Thread.<P>
+ **
+ ** <STRONG>Spec Note:</STRONG> it is not clear whether
+ ** the new Thread is guaranteed to pass the
+ ** checkAccessThreadGroup() test when using this
+ ** ThreadGroup. I presume so.
+ **
+ ** @return the ThreadGroup to put the new Thread into.
+ **/
+ public ThreadGroup getThreadGroup() {
+ return Thread.currentThread().getThreadGroup();
+ }
+
+ protected SecurityManager () {
+ if (System.getSecurityManager () != null)
+ throw new SecurityException ();
+ }
+}
+
+class SecurityContext {
+ Class[] classes;
+ SecurityContext(Class[] classes) {
+ this.classes = classes;
+ }
}
diff --git a/libjava/java/lang/StackOverflowError.java b/libjava/java/lang/StackOverflowError.java
index f4987c1..9c155e8 100644
--- a/libjava/java/lang/StackOverflowError.java
+++ b/libjava/java/lang/StackOverflowError.java
@@ -1,34 +1,65 @@
-// StackOverflowError.java
+/* StackOverflowError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
+ * Status: Believed complete and correct.
*/
+/**
+ * A <code>StackOverflowError</code> is thrown when a stack overflow occurs.
+ * This can occur because an application recurses too deeply.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class StackOverflowError extends VirtualMachineError
{
- public StackOverflowError ()
- {
- super ();
- }
-
- public StackOverflowError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = 8609175038441759607L;
+
+ /**
+ * Create an error without a message.
+ */
+ public StackOverflowError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public StackOverflowError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/StringIndexOutOfBoundsException.java b/libjava/java/lang/StringIndexOutOfBoundsException.java
index 9c0c60f..ebfc03c 100644
--- a/libjava/java/lang/StringIndexOutOfBoundsException.java
+++ b/libjava/java/lang/StringIndexOutOfBoundsException.java
@@ -1,37 +1,79 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* StringIndexOutOfBoundsException.java -- exception thrown to indicate
+ an attempt to access an index which is out of bounds.
+ 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 18, 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.
*/
-
+
+/**
+ * Exceptions may be thrown by one part of a Java program and caught
+ * by another in order to deal with exceptional conditions.
+ * This exception can be thrown to indicate an attempt to access an
+ * index which is out of bounds.
+ * Any negative integer less than or equal to -1 and positive
+ * integer greater than or equal to the size of the string is an index
+ * which would be out of bounds.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class StringIndexOutOfBoundsException extends IndexOutOfBoundsException
{
+ static final long serialVersionUID = -6762910422159637258L;
+
+ /**
+ * Create an exception without a message.
+ */
public StringIndexOutOfBoundsException()
- {
- super();
- }
+ {
+ super();
+ }
+
+ /**
+ * Create an exception with a message.
+ */
+ public StringIndexOutOfBoundsException(String s)
+ {
+ super(s);
+ }
+ /**
+ * Create an exception noting the illegal index.
+ */
public StringIndexOutOfBoundsException(int index)
- {
- this("String index out of range: " + index);
- }
-
- public StringIndexOutOfBoundsException(String msg)
- {
- super(msg);
- }
+ {
+ super("String index out of range: " + index);
+ }
}
diff --git a/libjava/java/lang/System.java b/libjava/java/lang/System.java
index 0f7bd7b..9ac160a 100644
--- a/libjava/java/lang/System.java
+++ b/libjava/java/lang/System.java
@@ -158,7 +158,7 @@ public final class System
public static String getProperty (String property, String defval)
{
if (secman != null)
- secman.checkPropertyAccess(property, defval);
+ secman.checkPropertyAccess(property);
if (properties == null)
init_properties ();
return properties.getProperty(property, defval);
diff --git a/libjava/java/lang/ThreadDeath.java b/libjava/java/lang/ThreadDeath.java
index ae0e3fb..fe4f9ba 100644
--- a/libjava/java/lang/ThreadDeath.java
+++ b/libjava/java/lang/ThreadDeath.java
@@ -1,19 +1,31 @@
-// ThreadDeath.java - Special exception registering Thread death.
+/* java.lang.ThreadDeath - Special exception registering Thread death.
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-/* Copyright (C) 1998, 1999, 2000 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.lang;
+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. */
-/**
- * @author Tom Tromey <tromey@cygnus.com>
- * @date August 26, 1998
- */
+
+package java.lang;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
@@ -21,10 +33,17 @@ package java.lang;
* Status: Complete to version 1.1
*/
-public class ThreadDeath extends Error
-{
- public ThreadDeath ()
- {
- super ();
- }
+/**
+ ** ThreadDeath is thrown in a thread when someone calls <CODE>stop()</CODE> on that thread.
+ **
+ ** <B>Important:</B> Make sure you rethrow this exception if you catch it. If you don't, the thread will not die.
+ **
+ ** @author John Keiser
+ ** @author Tom Tromey <tromey@cygnus.com>
+ ** @version 1.1.0, 5 Feb 1998, August 26 1998
+ ** @since JDK1.0
+ ** @see java.lang.Thread#stop()
+ **/
+
+public class ThreadDeath extends Error {
}
diff --git a/libjava/java/lang/UnknownError.java b/libjava/java/lang/UnknownError.java
index a7d1e20..58214ff 100644
--- a/libjava/java/lang/UnknownError.java
+++ b/libjava/java/lang/UnknownError.java
@@ -1,34 +1,63 @@
-// UnknownError.java
+/* UnknownError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
+ * Status: Believed complete and correct.
*/
+/**
+ * An <code>UnknownError</code> is thrown when a serious but unknown
+ * problem has occurred in the Java Virtual Machine.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ */
public class UnknownError extends VirtualMachineError
{
- public UnknownError ()
- {
- super ();
- }
-
- public UnknownError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = 2524784860676771849L;
+
+ /**
+ * Create an error without a message.
+ */
+ public UnknownError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public UnknownError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/UnsatisfiedLinkError.java b/libjava/java/lang/UnsatisfiedLinkError.java
index 0745642..63c3a1e 100644
--- a/libjava/java/lang/UnsatisfiedLinkError.java
+++ b/libjava/java/lang/UnsatisfiedLinkError.java
@@ -1,34 +1,66 @@
-// UnsatisfiedLinkError.java
+/* UnsatisfiedLinkError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
+ * Status: Believed complete and correct.
*/
+/**
+ * A <code>UnsatisfiedLinkError</code> is thrown if an appropriate
+ * native language definition of a method declared <code>native</code>
+ * cannot be found by the Java Virtual Machine.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class UnsatisfiedLinkError extends LinkageError
{
- public UnsatisfiedLinkError ()
- {
- super ();
- }
-
- public UnsatisfiedLinkError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = -4019343241616879428L;
+
+ /**
+ * Create an error without a message.
+ */
+ public UnsatisfiedLinkError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public UnsatisfiedLinkError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/UnsupportedClassVersionError.java b/libjava/java/lang/UnsupportedClassVersionError.java
new file mode 100644
index 0000000..c0ce259
--- /dev/null
+++ b/libjava/java/lang/UnsupportedClassVersionError.java
@@ -0,0 +1,58 @@
+/* UnsupportedClassVersionError.java
+ Copyright (C) 1998 Free Software Foundation, Inc.
+
+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. */
+
+
+package java.lang;
+
+/**
+ * An <code>UnsupportedClassVersionError</code> is thrown when the
+ * Java Virtual Machine determines it does not support the major and minor
+ * version numbers in the class file it is attempting to read.
+ *
+ * @since JDK 1.2
+ *
+ * @author Brian Jones
+ */
+public class UnsupportedClassVersionError extends ClassFormatError
+{
+ static final long serialVersionUID = -7123279212883497373L;
+
+ /**
+ * Create an error without a message.
+ */
+ public UnsupportedClassVersionError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public UnsupportedClassVersionError(String s)
+ {
+ super(s);
+ }
+}
diff --git a/libjava/java/lang/UnsupportedOperationException.java b/libjava/java/lang/UnsupportedOperationException.java
index f321fd0..8cf1b1f 100644
--- a/libjava/java/lang/UnsupportedOperationException.java
+++ b/libjava/java/lang/UnsupportedOperationException.java
@@ -1,32 +1,65 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* UnsupportedOperationException.java -- Exception thrown when an
+ unsupported operation is attempted on an object
+ 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 18, 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 exception is thrown by an object when an operation is
+ * requested of it that it does not support.
+ *
+ * @since JDK 1.2
+ *
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date September 18, 1998.
+ */
public class UnsupportedOperationException extends RuntimeException
{
- public UnsupportedOperationException()
+ static final long serialVersionUID = -1242599979055084673L;
+
+ /**
+ * Create an exception without a message.
+ */
+ public UnsupportedOperationException()
{
super();
}
- public UnsupportedOperationException(String msg)
+ /**
+ * Create an exception with a message.
+ */
+ public UnsupportedOperationException( String s )
{
- super(msg);
+ super(s);
}
}
diff --git a/libjava/java/lang/VMSecurityManager.java b/libjava/java/lang/VMSecurityManager.java
new file mode 100644
index 0000000..fd16804
--- /dev/null
+++ b/libjava/java/lang/VMSecurityManager.java
@@ -0,0 +1,71 @@
+/*
+ * java.lang.SecurityManager: part of the Java Class Libraries project.
+ * Copyright (C) 1998, 2001 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+package java.lang;
+
+import java.net.*;
+import java.util.*;
+import java.io.*;
+
+/**
+ ** VMSecurityManager is a helper class for SecurityManager the VM must
+ ** implement.
+ **
+ ** @author John Keiser
+ ** @version 1.1.0, 31 May 1998
+ **/
+class VMSecurityManager
+{
+ /** Get a list of all the classes currently executing
+ ** methods on the Java stack. getClassContext()[0] is
+ ** the currently executing method
+ ** <STRONG>Spec Note:</STRONG> does not say whether
+ ** the stack will include the getClassContext() call or
+ ** the one just before it.
+ **
+ ** @return an array containing all the methods on classes
+ ** on the Java execution stack.
+ **/
+ static Class[] getClassContext()
+ {
+ // FIXME: can't yet implement this for libgcj.
+ return new Class[0];
+ }
+
+ /** Get the current ClassLoader--the one nearest to the
+ ** top of the stack.
+ ** @return the current ClassLoader.
+ **/
+ static ClassLoader currentClassLoader()
+ {
+ // The docs above are wrong. See the online docs.
+ // FIXME this implementation is a bit wrong too -- the docs say we
+ // must also consider ancestors of the system class loader.
+ Class[] classStack = getClassContext ();
+ for (int i = 0; i < classStack.length; i++)
+ {
+ ClassLoader loader = classStack[i].getClassLoader();
+ if (loader != null)
+ return loader;
+ }
+
+ return null;
+ }
+}
diff --git a/libjava/java/lang/VerifyError.java b/libjava/java/lang/VerifyError.java
index 0e89e60..801428d 100644
--- a/libjava/java/lang/VerifyError.java
+++ b/libjava/java/lang/VerifyError.java
@@ -1,34 +1,65 @@
-// VerifyError.java
+/* VerifyError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
*/
+/**
+ * A <code>VerifyError</code> is thrown if there is a security problem or
+ * internal inconsistency in a class file as deteced by the "verifier."
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public class VerifyError extends LinkageError
{
- public VerifyError ()
- {
- super ();
- }
-
- public VerifyError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = 7001962396098498785L;
+
+ /**
+ * Create an error without a message.
+ */
+ public VerifyError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public VerifyError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/VirtualMachineError.java b/libjava/java/lang/VirtualMachineError.java
index 916842c..a64ca43 100644
--- a/libjava/java/lang/VirtualMachineError.java
+++ b/libjava/java/lang/VirtualMachineError.java
@@ -1,39 +1,66 @@
-// VirtualMachineError.java
+/* VirtualMachineError.java
+ 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.
-
-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 Tom Tromey <tromey@cygnus.com>
- * @date October 1, 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.
*/
-/* FIXME: We should consider adding some special error message when this
- * exception is thrown, or maybe if it being caught at top-level. Such
- * a message would direct the user to send a bug report to
- * gcj-bugs@cygnus.com, or something like that. --KKT */
-
+/**
+ * A <code>VirtualMachineError</code> or its subclasses are thrown to
+ * indicate there is something wrong with the Java Virtual Machine or that
+ * it does not have the resources needed for it to continue execution.
+ *
+ * @since JDK 1.0
+ *
+ * @author Brian Jones
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date October 1, 1998
+ */
public abstract class VirtualMachineError extends Error
{
- public VirtualMachineError ()
- {
- super ();
- }
-
- public VirtualMachineError (String msg)
- {
- super (msg);
- }
+ static final long serialVersionUID = 4161983926571568670L;
+
+ /**
+ * Create an error without a message.
+ */
+ public VirtualMachineError()
+ {
+ super();
+ }
+
+ /**
+ * Create an error with a message.
+ */
+ public VirtualMachineError(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/lang/reflect/InvocationTargetException.java b/libjava/java/lang/reflect/InvocationTargetException.java
index 0152a7b..4e04b42 100644
--- a/libjava/java/lang/reflect/InvocationTargetException.java
+++ b/libjava/java/lang/reflect/InvocationTargetException.java
@@ -1,75 +1,128 @@
-// InvocationTargetException.java - Wrapper exception for reflection.
+/* InvocationTargetException.java - Wrapper exception for reflection
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
+This file is part of GNU Classpath.
- This file is part of libgcj.
-
-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.reflect;
+
import java.io.PrintStream;
import java.io.PrintWriter;
-/**
- * @author Tom Tromey <tromey@cygnus.com>
- * @date December 12, 1998
- */
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* Status: Believed complete and correct.
*/
-public class InvocationTargetException extends Exception
+/**
+ * InvocationTargetException is sort of a way to "wrap" whatever exception
+ * comes up when a method or constructor is called via Reflection.
+ *
+ * @author John Keiser
+ * @version 1.1.0, 31 May 1998
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date December 12, 1998
+ *
+ * @see Method#invoke(Object,Object[])
+ * @see Constructor#newInstance(Object[])
+ */
+
+public class InvocationTargetException extends Exception
{
- public Throwable getTargetException ()
+ static final long serialVersionUID = 4085088731926701167L;
+
+ private Throwable target = null;
+
+ protected InvocationTargetException()
{
- return target;
+ super();
}
-
- protected InvocationTargetException ()
+
+ /**
+ * Create an <code>InvocationTargetException</code> using another
+ * exception.
+ * @param targetException the exception to wrap
+ */
+ public InvocationTargetException(Throwable targetException)
{
- super ();
- target = null;
+ super(targetException.toString());
+ target = targetException;
}
-
- public InvocationTargetException (Throwable exception)
+
+ /**
+ * Create an <code>InvocationTargetException</code> using another
+ * exception and an error message.
+ *
+ * @param targetException the exception to wrap
+ * @param err an extra reason for the exception-throwing
+ */
+ public InvocationTargetException(Throwable targetException, String err)
{
- super ();
- target = exception;
+ super(err);
+ target = targetException;
}
-
- public InvocationTargetException (Throwable exception, String msg)
+
+ /**
+ * Get the wrapped (targeted) exception.
+ *
+ * @return the targeted exception.
+ */
+ public Throwable getTargetException()
{
- super (msg);
- target = exception;
+ return target;
}
- // This is from JDK 1.2.
- public void printStackTrace ()
+ public void printStackTrace()
{
- if (target != null)
+ if (target == null)
+ super.printStackTrace();
+ else
+ {
+ System.err.print(this.getClass() + ": ");
target.printStackTrace();
+ }
}
- // This is from JDK 1.2.
- public void printStackTrace (PrintStream s)
+ public void printStackTrace(PrintStream ps)
{
- if (target != null)
- target.printStackTrace(s);
+ if (target == null)
+ super.printStackTrace(ps);
+ else
+ {
+ ps.print(this.getClass() + ": ");
+ target.printStackTrace(ps);
+ }
}
- // This is from JDK 1.2.
- public void printStackTrace (PrintWriter wr)
+ public void printStackTrace(PrintWriter pw)
{
- if (target != null)
- target.printStackTrace(wr);
+ if (target == null)
+ super.printStackTrace(pw);
+ else
+ {
+ pw.print(this.getClass() + ": ");
+ target.printStackTrace(pw);
+ }
}
-
- // The wrapped exception. The name is specified by the
- // serialization spec.
- private Throwable target;
-
- private static final long serialVersionUID = 4085088731926701167L;
}
diff --git a/libjava/java/net/BindException.java b/libjava/java/net/BindException.java
index 3e3255c..3aeedd3 100644
--- a/libjava/java/net/BindException.java
+++ b/libjava/java/net/BindException.java
@@ -1,19 +1,30 @@
-// BindException.java
+/* BindException.java -- An exception occured while binding to a socket
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-/* Copyright (C) 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.net;
+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. */
-/**
- * @author Warren Levy <warrenl@cygnus.com>
- * @date March 5, 1999.
- */
+package java.net;
/**
* Written using on-line Java Platform 1.2 API Specification, as well
@@ -21,15 +32,44 @@ package java.net;
* Status: Believed complete and correct.
*/
+/**
+ * This exception indicates that an error occured while attempting to bind
+ * socket to a particular port.
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date March 5, 1999.
+ */
public class BindException extends SocketException
{
- public BindException()
- {
- super();
- }
-
- public BindException(String msg)
- {
- super(msg);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Initializes a new instance of <code>BindException</code> without
+ * a descriptive error message.
+ */
+public
+BindException()
+{
+ super();
+}
+
+/*************************************************************************/
+
+/**
+ * Initializes a new instance of <code>BindException</code> with
+ * a descriptive error message, such as the text from strerror(3).
+ *
+ * @param message A message describing the error that occurred.
+ */
+public
+BindException(String message)
+{
+ super(message);
}
+
+} // class BindException
+
diff --git a/libjava/java/net/ConnectException.java b/libjava/java/net/ConnectException.java
index 449056f..0ac64c8 100644
--- a/libjava/java/net/ConnectException.java
+++ b/libjava/java/net/ConnectException.java
@@ -1,19 +1,31 @@
-// ConnectException.java
+/* ConnectException.java -- An exception occured while connecting to a host
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-/* Copyright (C) 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.net;
+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. */
-/**
- * @author Warren Levy <warrenl@cygnus.com>
- * @date March 5, 1999.
- */
+
+package java.net;
/**
* Written using on-line Java Platform 1.2 API Specification, as well
@@ -21,15 +33,45 @@ package java.net;
* Status: Believed complete and correct.
*/
+/**
+ * This exception indicates that an error occured while attempting to
+ * connect to a remote host. Often this indicates that the remote host
+ * refused the connection (ie, is not listening on the target socket).
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date March 5, 1999.
+ */
public class ConnectException extends SocketException
{
- public ConnectException()
- {
- super();
- }
-
- public ConnectException(String msg)
- {
- super(msg);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Initializes a new instance of <code>ConnectException</code> without
+ * a descriptive error message.
+ */
+public
+ConnectException()
+{
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Initializes a new instance of <code>ConnectException</code> with
+ * a descriptive error message, such as the text from strerror(3).
+ *
+ * @param message A message describing the error that occurred.
+ */
+public
+ConnectException(String message)
+{
+ super(message);
+}
+
+} // class ConnectException
+
diff --git a/libjava/java/net/MalformedURLException.java b/libjava/java/net/MalformedURLException.java
index 5ea6480..660f253 100644
--- a/libjava/java/net/MalformedURLException.java
+++ b/libjava/java/net/MalformedURLException.java
@@ -1,19 +1,30 @@
-// MalformedURLException.java
+/* MalformedURLException.java -- A URL was not in a valid format
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-/* Copyright (C) 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.net;
+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. */
-/**
- * @author Warren Levy <warrenl@cygnus.com>
- * @date March 5, 1999.
- */
+package java.net;
/**
* Written using on-line Java Platform 1.2 API Specification, as well
@@ -21,15 +32,44 @@ package java.net;
* Status: Believed complete and correct.
*/
+/**
+ * This exception indicates that a URL passed to an object was not in a
+ * valid format.
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date March 5, 1999.
+ */
public class MalformedURLException extends java.io.IOException
{
- public MalformedURLException()
- {
- super();
- }
-
- public MalformedURLException(String msg)
- {
- super(msg);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Initializes a new instance of <code>MalformedURLException</code> without
+ * a descriptive error message.
+ */
+public
+MalformedURLException()
+{
+ super();
+}
+
+/*************************************************************************/
+
+/**
+ * Initializes a new instance of <code>MalformedURLException</code> without
+ * a descriptive error message.
+ *
+ * @param message A message describing the error that occurred.
+ */
+public
+MalformedURLException(String message)
+{
+ super(message);
}
+
+} // class MalformedURLException
+
diff --git a/libjava/java/net/NoRouteToHostException.java b/libjava/java/net/NoRouteToHostException.java
index cb1c5f8..bae9fa9 100644
--- a/libjava/java/net/NoRouteToHostException.java
+++ b/libjava/java/net/NoRouteToHostException.java
@@ -1,19 +1,31 @@
-// NoRouteToHostException.java
+/* NoRouteToHostException.java -- Cannot connect to a host
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-/* Copyright (C) 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.net;
+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. */
-/**
- * @author Warren Levy <warrenl@cygnus.com>
- * @date March 5, 1999.
- */
+
+package java.net;
/**
* Written using on-line Java Platform 1.2 API Specification, as well
@@ -21,15 +33,44 @@ package java.net;
* Status: Believed complete and correct.
*/
+/**
+ * This exception indicates that there is no TCP/IP route to the requested
+ * host. This is often due to a misconfigured routing table.
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date March 5, 1999.
+ */
public class NoRouteToHostException extends SocketException
{
- public NoRouteToHostException()
- {
- super();
- }
-
- public NoRouteToHostException(String msg)
- {
- super(msg);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Initializes an instance of <code>NoRouteToHostException</code>
+ * without a descriptive error message.
+ */
+public
+NoRouteToHostException()
+{
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Initializes an instance of <code>NoRouteToHostException</code>
+ * witha descriptive error message, such as the text from strerror(3).
+ *
+ * @param message A message describing the error that occurred.
+ */
+public
+NoRouteToHostException(String message)
+{
+ super(message);
+}
+
+} // class NoRouteToHostException
+
diff --git a/libjava/java/net/ProtocolException.java b/libjava/java/net/ProtocolException.java
index 2263457..5556f28 100644
--- a/libjava/java/net/ProtocolException.java
+++ b/libjava/java/net/ProtocolException.java
@@ -1,19 +1,30 @@
-// ProtocolException.java
+/* ProtocolException.java -- A low level protocol error occured
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-/* Copyright (C) 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.net;
+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. */
-/**
- * @author Warren Levy <warrenl@cygnus.com>
- * @date March 5, 1999.
- */
+package java.net;
/**
* Written using on-line Java Platform 1.2 API Specification, as well
@@ -21,15 +32,45 @@ package java.net;
* Status: Believed complete and correct.
*/
+/**
+ * This exception indicates that some sort of low level protocol
+ * exception occured. Look in the descriptive message (if any) for
+ * details on what went wrong
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date March 5, 1999.
+ */
public class ProtocolException extends java.io.IOException
{
- public ProtocolException()
- {
- super();
- }
-
- public ProtocolException(String msg)
- {
- super(msg);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Initializes a new instance of <code>ProtocolException</code>
+ * without a descriptive error message.
+ */
+public
+ProtocolException()
+{
+ super();
+}
+
+/*************************************************************************/
+
+/**
+ * Initializes a new instance of <code>ProtocolException</code>
+ * with a descriptive error message.
+ *
+ * @param message A message describing the error that occurred.
+ */
+public
+ProtocolException(String message)
+{
+ super(message);
}
+
+} // class ProtocolException
+
diff --git a/libjava/java/net/SocketException.java b/libjava/java/net/SocketException.java
index 847cdc9..37135f3 100644
--- a/libjava/java/net/SocketException.java
+++ b/libjava/java/net/SocketException.java
@@ -1,33 +1,74 @@
-// SocketException.java - Base class for networking exceptions
+/* SocketException.java -- An exception occured while performing a socket op
+ 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.net;
+/* Written using on-line Java Platform 1.2 API Specification.
+ * Believed complete and correct.
+ */
+
/**
- * @author Per Bothner
- * @date January 6, 1999.
+ * This exception indicates that a generic error occured related to an
+ * operation on a socket. Check the descriptive message (if any) for
+ * details on the nature of this error
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Per Bothner
+ * @date January 6, 1999.
+ */
+public class SocketException extends java.io.IOException
+{
+
+/*
+ * Constructors
*/
-/** Written using on-line Java Platform 1.2 API Specification.
- * Believed complete and correct.
+/**
+ * Initializes a new instance of <code>SocketException</code> without
+ * a descriptive error message.
*/
+public
+SocketException()
+{
+ super();
+}
-public class SocketException extends java.io.IOException
+/*************************************************************************/
+
+/**
+ * Initializes a new instance of <code>SocketException</code> without
+ * a descriptive error message.
+ *
+ * @param message A message describing the error that occurred.
+ */
+public
+SocketException(String message)
{
- public SocketException ()
- {
- super();
- }
-
- public SocketException (String s)
- {
- super(s);
- }
+ super(message);
}
+
+} // class SocketException
+
diff --git a/libjava/java/net/UnknownHostException.java b/libjava/java/net/UnknownHostException.java
index 12936e0..ad7b25a 100644
--- a/libjava/java/net/UnknownHostException.java
+++ b/libjava/java/net/UnknownHostException.java
@@ -1,34 +1,77 @@
-// UnknownHostException.java
+/* UnknownHostException.java -- The hostname is not unknown
+ Copyright (C) 1998, 1999, 2000, 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.net;
+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. */
-/**
- * @author Per Bothner
- * @date January 6, 1999.
- */
+package java.net;
/*
* Written using on-line Java Platform 1.2 API Specification.
* Status: Believed complete and correct.
*/
+/**
+ * This exception indicates that an attempt was made to reference a hostname
+ * or IP address that is not valid. This could possibly indicate that a
+ * DNS problem has occurred, but most often means that the host was not
+ * correctly specified.
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Per Bothner
+ * @date January 6, 1999.
+ */
public class UnknownHostException extends java.io.IOException
{
- public UnknownHostException ()
- {
- super();
- }
-
- public UnknownHostException (String host)
- {
- super(host);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Initializes a new instance of <code>UnknownHostException</code>
+ * without a descriptive error message.
+ */
+public
+UnknownHostException()
+{
+ super();
}
+
+/*************************************************************************/
+
+/**
+ * Initializes a new instance of <code>UnknownHostException</code>
+ * with a descriptive error message, such as the name of the host
+ * that could not be resolved.
+ *
+ * @param message A message describing the error that occurrred.
+ */
+public
+UnknownHostException(String message)
+{
+ super(message);
+}
+
+} // class UnknownHostException
+
diff --git a/libjava/java/net/UnknownServiceException.java b/libjava/java/net/UnknownServiceException.java
index 20b00bd..f82607a 100644
--- a/libjava/java/net/UnknownServiceException.java
+++ b/libjava/java/net/UnknownServiceException.java
@@ -1,19 +1,30 @@
-// UnknownServiceException.java
+/* UnknownServiceException.java -- A service error occured
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-/* Copyright (C) 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.
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-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.
-package java.net;
+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. */
-/**
- * @author Warren Levy <warrenl@cygnus.com>
- * @date March 5, 1999.
- */
+package java.net;
/**
* Written using on-line Java Platform 1.2 API Specification, as well
@@ -21,15 +32,46 @@ package java.net;
* Status: Believed complete and correct.
*/
+/**
+ * Contrary to what you might think, this does not indicate that the
+ * TCP/IP service name specified was invalid. Instead it indicates that
+ * the MIME type returned from a URL could not be determined or that an
+ * attempt was made to write to a read-only URL.
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Warren Levy <warrenl@cygnus.com>
+ * @date March 5, 1999.
+ */
public class UnknownServiceException extends java.io.IOException
{
- public UnknownServiceException()
- {
- super();
- }
-
- public UnknownServiceException(String msg)
- {
- super(msg);
- }
+
+/*
+ * Constructors
+ */
+
+/**
+ * Initializes a new instance of <code>UnknownServiceException</code>
+ * without a descriptive error message.
+ */
+public
+UnknownServiceException()
+{
+ super();
+}
+
+/*************************************************************************/
+
+/**
+ * Initializes a new instance of <code>UnknownServiceException</code>
+ * without a descriptive error message.
+ *
+ * @param message A message describing the error that occurred.
+ */
+public
+UnknownServiceException(String message)
+{
+ super(message);
}
+
+} // class UnknownServiceException
+
diff --git a/libjava/java/text/ParseException.java b/libjava/java/text/ParseException.java
index 7a65439..fd7971a 100644
--- a/libjava/java/text/ParseException.java
+++ b/libjava/java/text/ParseException.java
@@ -1,34 +1,91 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* ParseException.java -- An error occurred while parsing.
+ 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.text;
-/**
- * @author Per Bothner <bothner@cygnus.com>
- * @date October 25, 1998.
- */
/* Written using "Java Class Libraries", 2nd edition, plus online
* API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct.
*/
+/**
+ * This exception is thrown when an unexpected error occurs during parsing.
+ *
+ * @version 0.0
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Per Bothner <bothner@cygnus.com>
+ * @date October 25, 1998.
+ */
public class ParseException extends Exception
{
- private int errorOffset;
-
- public ParseException (String msg, int errorOffset)
- {
- super(msg);
- this.errorOffset = errorOffset;
- }
-
- public int getErrorOffset ()
- {
- return errorOffset;
- }
+
+/*
+ * Instance Variables
+ */
+
+/**
+ * This is the position where the error was encountered.
+ */
+private int errorOffset;
+
+/*************************************************************************/
+
+/*
+ * Constructors
+ */
+
+/**
+ * This method initializes a new instance of <code>ParseException</code>
+ * with a detailed error message and a error position.
+ *
+ * @param msg The descriptive message describing the error.
+ * @param offset The position where the error was encountered.
+ */
+public
+ParseException(String s, int offset)
+{
+ super(s);
+
+ errorOffset = offset;
}
+
+/*************************************************************************/
+
+/**
+ * This method returns the position where the error occurred.
+ *
+ * @return The position where the error occurred.
+ */
+public int
+getErrorOffset()
+{
+ return(errorOffset);
+}
+
+} // class ParseException
+