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 1. */
20  public class InputMissingJavadocMethod_01 { // ok
21  
22      /** Do 1.
23       * @throws TestException1 when problem occurs.
24       */
25      public void doStuff1() throws TestException1 {
26          try {
27              doStuff2();
28          } catch (final TestException2 e) { }
29          throw new InputMissingJavadocMethod_01().new TestException1("");
30      }
31      /** Do 2.
32       * @throws TestException2 when problem occurs.
33       */
34      private static void doStuff2() throws TestException2 {
35          throw new TestException2("");
36      }
37      /** Exception 1.
38       */
39      class TestException1 extends Exception {
40          /** Exception 1.
41           * @param messg message
42           */
43          TestException1(String messg) {
44              super(messg);
45          }
46      }
47      /** Exception 2.
48       */
49      public static class TestException2 extends Exception {
50          /** Exception 2.
51           * @param messg message
52           */
53          TestException2(String messg) {
54              super(messg);
55          }
56      }
57  }