KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > javadoc > method > Test1


1 package test.javadoc.method;
2 /** Test 1. */
3 public class Test1 {
4
5     /** Do 1.
6      * @throws TestException1 when error occurrs.
7      */

8     public void doStuff1() throws TestException1 {
9         try {
10             doStuff2();
11         } catch (TestException2 e) { }
12         throw new Test1().new TestException1("");
13     }
14     /** Do 2.
15      * @throws TestException2 when error occurrs.
16      */

17     private static void doStuff2() throws TestException2 {
18         throw new TestException2("");
19     }
20     /** Exception 1.
21      */

22     class TestException1 extends Exception JavaDoc {
23         /** Exception 1.
24          * @param messg message
25          */

26         TestException1(String JavaDoc messg) {
27             super(messg);
28         }
29     }
30     /** Exception 2.
31      */

32     public static class TestException2 extends Exception JavaDoc {
33         /** Exception 2.
34          * @param messg message
35          */

36         TestException2(String JavaDoc messg) {
37             super(messg);
38         }
39     }
40 }
41
42
Popular Tags