View Javadoc
1   ////////////////////////////////////////////////////////////////////////////////
2   // Test case file for checkstyle.
3   // Created: 2001
4   ////////////////////////////////////////////////////////////////////////////////
5   package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocmethod;
6   
7   public class InputJavadocMethodPublicOnly // ignore - need javadoc
8   {
9       private interface InnerInterface // ignore - when not relaxed about Javadoc
10      {
11          String CONST = "InnerInterface"; // ignore - w.n.r.a.j
12          void method(); // ignore - when not relaxed about Javadoc
13  
14          class InnerInnerClass // ignore - when not relaxed about Javadoc
15          {
16              private int mData; // ignore - when not relaxed about Javadoc
17  
18              private InnerInnerClass()
19              {
20                  final Runnable r = new Runnable() {
21                          public void run() {};
22                      };
23              }
24  
25              void method2() // ignore - when not relaxed about Javadoc
26              {
27                  final Runnable r = new Runnable() {
28                          public void run() {};
29                      };
30              }
31          }
32      }
33  
34      private class InnerClass // ignore
35      {
36          private int mDiff; // ignore - when not relaxed about Javadoc
37  
38          void method() // ignore - when not relaxed about Javadoc
39          {
40          }
41      }
42  
43      private int mSize; // ignore - when not relaxed about Javadoc
44      int mLen; // ignore - when not relaxed about Javadoc
45      protected int mDeer; // ignore
46      public int aFreddo; // ignore
47  
48      // ignore - need Javadoc
49      private InputJavadocMethodPublicOnly(int aA)
50      {
51      }
52  
53      // ignore - need Javadoc when not relaxed
54      InputJavadocMethodPublicOnly(String aA)
55      {
56      }
57  
58      // ignore - always need javadoc
59      protected InputJavadocMethodPublicOnly(Object aA)
60      {
61      }
62  
63      // ignore - always need javadoc
64      public InputJavadocMethodPublicOnly(Class<Object> aA)
65      {
66      }
67  
68      // ignore - when not relaxed about Javadoc
69      private void method(int aA)
70      {
71      }
72  
73      // ignore - when not relaxed about Javadoc
74      void method(Long aA)
75      {
76      }
77  
78      // ignore - need javadoc
79      protected void method(Class<Object> aA)
80      {
81      }
82  
83      // ignore - need javadoc
84      public void method(StringBuffer aA)
85      {
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 }