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