View Javadoc
1   /*
2   JavadocMethod
3   allowedAnnotations = (default)Override
4   validateThrows = (default)false
5   accessModifiers = (default)public, protected, package, private
6   allowMissingParamTags = (default)false
7   allowMissingReturnTag = (default)false
8   tokens = (default)METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF, COMPACT_CTOR_DEF
9   
10  
11  */
12  
13  package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocmethod;
14  
15  public class InputJavadocMethod_02 {
16  
17      /** Exception 1.
18       */
19      class TestException1 extends Exception { // ok
20          /** Exception 1.
21           * @param messg message
22           */
23          TestException1(String messg) { // ok
24              super(messg);
25          }
26      }
27      /** Exception 2.
28       */
29      public static class TestException2 extends Exception { // ok
30          /** Exception 2.
31           * @param messg message
32           */
33          TestException2(String messg) { // ok
34              super(messg);
35          }
36      }
37      /** Do 1.
38       * @throws TestException1 when problem occurs.
39       */
40      public void doStuff1() throws TestException1 { // ok
41          try {
42              doStuff2();
43          } catch (final TestException2 e) { } // ok
44          throw new InputJavadocMethod_02().new TestException1("");
45      }
46      /** Do 2.
47       * @throws TestException2 when problem occurs.
48       */
49      private static void doStuff2() throws TestException2 { // ok
50          throw new TestException2(""); // ok
51      }
52  }