Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.2386.2.21 diff -u -3 -p -u -r1.2386.2.21 ChangeLog --- ChangeLog 18 Sep 2004 23:02:31 -0000 1.2386.2.21 +++ ChangeLog 26 Sep 2004 22:45:48 -0000 @@ -1,3 +1,14 @@ +2004-09-26 Andrew John Hughes
+ + * java/lang/Comparable.java + Updated status to be 1.5. + * java/lang/Iterable.java + Added missing documentation. + * java/lang/Readable.java + Added documentation. + * java/lang/Thread.java + (UncaughtExceptionHandler): documented. + 2004-09-18 Tom Tromey * java/lang/annotation/Retention.java: Documented. Index: java/lang/Comparable.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/lang/Comparable.java,v retrieving revision 1.10.2.1 diff -u -3 -p -u -r1.10.2.1 Comparable.java --- java/lang/Comparable.java 5 Aug 2004 21:09:36 -0000 1.10.2.1 +++ java/lang/Comparable.java 26 Sep 2004 22:45:49 -0000 @@ -65,7 +65,7 @@ package java.lang; * @see TreeSet * @see TreeMap * @since 1.2 - * @status updated to 1.4 + * @status updated to 1.5 */ public interface Comparableforeach
construct.
*
+ * @author Tom Tromey
* @since 1.5
*/
public interface IterableReadable
object is simply a source for Unicode character
+ * data. On request, a Readable
will provide its data in
+ * a supplied CharBuffer
.
+ *
+ * @author Tom Tromey
+ * @author Andrew John Hughes
+ * @since 1.5
+ */
public interface Readable
{
+
+ /**
+ * Adds the character data supplied by this Readable
+ * to the specified character buffer. This method simply places
+ * each character into the buffer as supplied, using put()
,
+ * without flipping or rewinding.
+ *
+ * @param buf the buffer to place the character data in.
+ * @return the number of char
values placed in the buffer,
+ * or -1 if no more characters are available.
+ * @throws IOException if an I/O error occurs.
+ * @throws NullPointerException if buf is null.
+ * @throws ReadOnlyBufferException if buf is read only.
+ */
int read(CharBuffer buf) throws IOException;
+
}
Index: java/lang/Thread.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/Thread.java,v
retrieving revision 1.8.2.1
diff -u -3 -p -u -r1.8.2.1 Thread.java
--- java/lang/Thread.java 7 Aug 2004 00:27:06 -0000 1.8.2.1
+++ java/lang/Thread.java 26 Sep 2004 22:45:49 -0000
@@ -970,8 +970,61 @@ public class Thread implements Runnable
vmThread = null;
}
- interface UncaughtExceptionHandler
+ /**
+ *
+ * This interface is used to handle uncaught exceptions
+ * which cause a Thread
to terminate. When
+ * a thread, t, is about to terminate due to an uncaught
+ * exception, the virtual machine looks for a class which
+ * implements this interface, in order to supply it with
+ * the dying thread and its uncaught exception.
+ *
+ * The virtual machine makes two attempts to find an + * appropriate handler for the uncaught exception, in + * the following order: + *
+ *t.getUncaughtExceptionHandler()
--
+ * the dying thread is queried first for a handler
+ * specific to that thread.
+ * t.getThreadGroup()
--
+ * the thread group of the dying thread is used to
+ * handle the exception. If the thread group has
+ * no special requirements for handling the exception,
+ * it may simply forward it on to
+ * Thread.getDefaultUncaughtExceptionHandler()
,
+ * the default handler, which is used as a last resort.
+ * + * The first handler found is the one used to handle + * the uncaught exception. + *
+ * + * @author Tom Tromey + * @author Andrew John Hughes + * @since 1.5 + * @see Thread#getUncaughtExceptionHandler() + * @see Thread#setUncaughtExceptionHander(java.lang.Thread.UncaughtExceptionHandler) + * @see Thread#getDefaultUncaughtExceptionHandler() + * @see + * Thread#setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler) + */ + public static interface UncaughtExceptionHandler { + /** + * Invoked by the virtual machine with the dying thread + * and the uncaught exception. Any exceptions thrown + * by this method are simply ignored by the virtual + * machine. + * + * @param thr the dying thread. + * @param exc the uncaught exception. + */ void uncaughtException(Thread thr, Throwable exc); }