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 InputJavadocMethodPublicOnlyTwo {
16      /**
17         A param tag should not be required here when relaxed about Javadoc.
18         Writing a little documentation should not be worse than not
19         writing any documentation at all.
20       */
21      private void method(String aA) // violation 'Expected @param tag for 'aA'.'
22      {
23      }
24  
25      /**
26         This inner class has no author tag, which is OK.
27       */
28      public class InnerWithoutAuthor
29      {
30  
31      }
32  
33      /** {@inheritDoc} */
34      public String toString()
35      {
36          return super.toString();
37      }
38  
39      @Deprecated @Override
40      public int hashCode()
41      {
42          return super.hashCode();
43      }
44  
45      public Thread anonymousClassInMethod() {
46          return new Thread() {
47              @Override
48              public void run() {
49                  privateMethod(null, null);
50              }
51  
52              /**
53               * Javadoc
54               */
55              private String privateMethod(String a, String b) {
56                  return null;
57              }
58          };
59      }
60  
61      private final Thread anonymousClassInField = new Thread() {
62          @Override
63          public void run() {
64              publicMethod(null, null);
65          }
66  
67          /**
68           * Javadoc
69           */
70          public String publicMethod(String a, String b) {
71              return null;
72          }
73      };
74  }