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