1   package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocmethod;
2   
3   public class InputJavadocMethodGenerics <E extends java.lang.Exception,
4                              RE extends RuntimeException & java.io.Serializable>
5   {
6       /**
7        * @throws E in some cases
8        * @throws RE in some cases
9        */
10      public void method1() throws E
11      {
12      }
13  
14      /**
15       * RuntimeException is not declared.
16       */
17      public void method2() throws RE
18      {
19      }
20  
21      /**
22       * @throws E in some cases
23       * @throws RE in other cases
24       */
25      public void method3() throws E, RE
26      {
27      }
28  
29      /**
30       * @throws RE in some cases
31       * @throws NPE in some other cases
32       */
33      public <NPE extends NullPointerException> void method4() throws NPE, RE
34      {
35      }
36  
37      public class InnerClass <RuntimeException extends ClassCastException>
38      {
39          /**
40           * @throws E in some case
41           * @throws RE in some other cases
42           */
43          public void method1() throws RuntimeException, RE,
44              java.lang.RuntimeException
45          {
46          }
47      }
48  
49      /**
50       * @param <T> some parameter
51       * @param <E2> some exception parameter
52       */
53      public interface InnerInterface<T, E2 extends Throwable> {
54          /**
55           * Some javadoc.
56           * @param t a parameter
57           * @throws E2 in some case.
58           * @return some string
59           */
60          public abstract String doStuff(T t) throws E2;
61      }
62  
63      /**
64       * @param <P> some parameter
65       */
66      public interface InvalidParameterInJavadoc<T> {}
67  }
68