View Javadoc
1   /*
2   MissingJavadocMethod
3   minLineCount = (default)-1
4   allowedAnnotations = (default)Override
5   scope = nothing
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 = "nothing"
18   */
19  public class InputMissingJavadocMethodPublicOnly2
20  {
21      private interface InnerInterface
22      {
23          String CONST = "InnerInterface";
24          void method(); // ok
25  
26          class InnerInnerClass
27          {
28              private int mData;
29  
30              private InnerInnerClass() // ok
31              {
32                  final Runnable r = new Runnable() {
33                      public void run() {};
34                  };
35              }
36  
37              void method2() // ok
38              {
39                  final Runnable r = new Runnable() {
40                      public void run() {};
41                  };
42              }
43          }
44      }
45  
46      private class InnerClass
47      {
48          private int mDiff;
49  
50          void method() // ok
51          {
52          }
53      }
54  
55      private int mSize;
56      int mLen;
57      protected int mDeer;
58      public int aFreddo;
59  
60      private InputMissingJavadocMethodPublicOnly2(int aA) // ok
61      {
62      }
63  
64      InputMissingJavadocMethodPublicOnly2(String aA) // ok
65      {
66      }
67  
68      protected InputMissingJavadocMethodPublicOnly2(Object aA) // ok
69      {
70      }
71  
72      public InputMissingJavadocMethodPublicOnly2(Class<Object> aA) // ok
73      {
74      }
75  
76      private void method(int aA) // ok
77      {
78      }
79  
80      void method(Long aA) // ok
81      {
82      }
83  
84      protected void method(Class<Object> aA) // ok
85      {
86      }
87  
88      public void method(StringBuffer aA) // ok
89      {
90      }
91  
92      /**
93       * A param tag should not be required here when relaxed about Javadoc.
94       * Writing a little documentation should not be worse than not
95       * writing any documentation at all.
96       */
97      private void method(String aA)
98      {
99      }
100 
101     /**
102      * This inner class has no author tag, which is OK.
103      */
104     public class InnerWithoutAuthor
105     {
106 
107     }
108 
109     /** {@inheritDoc} */
110     public String toString()
111     {
112         return super.toString();
113     }
114 
115     @Deprecated @Override
116     public int hashCode()
117     {
118         return super.hashCode();
119     }
120 }