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