View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocmethod;
2   /** Test 2. */
3   public class InputJavadocMethod_02 {
4   
5       /** Exception 1.
6        */
7       class TestException1 extends Exception {
8           /** Exception 1.
9            * @param messg message
10           */
11          TestException1(String messg) {
12              super(messg);
13          }
14      }
15      /** Exception 2.
16       */
17      public static class TestException2 extends Exception {
18          /** Exception 2.
19           * @param messg message
20           */
21          TestException2(String messg) {
22              super(messg);
23          }
24      }
25      /** Do 1.
26       * @throws TestException1 when error occurrs.
27       */
28      public void doStuff1() throws TestException1 {
29          try {
30              doStuff2();
31          } catch (final TestException2 e) { }
32          throw new InputJavadocMethod_02().new TestException1("");
33      }
34      /** Do 2.
35       * @throws TestException2 when error occurrs.
36       */
37      private static void doStuff2() throws TestException2 {
38          throw new TestException2("");
39      }
40  }