View Javadoc
1   /*
2   MissingJavadocMethod
3   minLineCount = (default)-1
4   allowedAnnotations = (default)Override
5   scope = private
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 = "private"
18   */
19  public class InputMissingJavadocMethodNoJavadoc //comment test
20  {
21      public int i1;
22      protected int i2;
23      int i3;
24      private int i4;
25  
26      public void foo1() {} // violation
27      protected void foo2() {} // violation
28      void foo3() {} // violation
29      private void foo4() {} // violation
30  
31      protected class ProtectedInner {
32          public int i1;
33          protected int i2;
34          int i3;
35          private int i4;
36  
37          public void foo1() {} // violation
38          protected void foo2() {} // violation
39          void foo3() {} // violation
40          private void foo4() {} // violation
41      }
42  
43      class PackageInner {
44          public int i1;
45          protected int i2;
46          int i3;
47          private int i4;
48  
49          public void foo1() {} // violation
50          protected void foo2() {} // violation
51          void foo3() {} // violation
52          private void foo4() {} // violation
53      }
54  
55      private class PrivateInner {
56          public int i1;
57          protected int i2;
58          int i3;
59          private int i4;
60  
61          public void foo1() {} // violation
62          protected void foo2() {} // violation
63          void foo3() {} // violation
64          private void foo4() {} // violation
65      }
66  }
67  
68  class PackageClass {
69      public int i1;
70      protected int i2;
71      int i3;
72      private int i4;
73  
74      public void foo1() {} // violation
75      protected void foo2() {} // violation
76      void foo3() {} // violation
77      private void foo4() {} // violation
78  
79      public class PublicInner {
80          public int i1;
81          protected int i2;
82          int i3;
83          private int i4;
84  
85          public void foo1() {} // violation
86          protected void foo2() {} // violation
87          void foo3() {} // violation
88          private void foo4() {} // violation
89      }
90  
91      protected class ProtectedInner {
92          public int i1;
93          protected int i2;
94          int i3;
95          private int i4;
96  
97          public void foo1() {} // violation
98          protected void foo2() {} // violation
99          void foo3() {} // violation
100         private void foo4() {} // violation
101     }
102 
103     class PackageInner {
104         public int i1;
105         protected int i2;
106         int i3;
107         private int i4;
108 
109         public void foo1() {} // violation
110         protected void foo2() {} // violation
111         void foo3() {} // violation
112         private void foo4() {} // violation
113     }
114 
115     private class PrivateInner {
116         public int i1;
117         protected int i2;
118         int i3;
119         private int i4;
120 
121         public void foo1() {} // violation
122         protected void foo2() {} // violation
123         void foo3() {} // violation
124         private void foo4() {} // violation
125     }
126 
127     class IgnoredName {
128         // ignore by name
129         private int logger;
130         // no warning, 'serialVersionUID' fields do not require Javadoc
131         private static final long serialVersionUID = 0;
132     }
133 
134     /**/
135     void methodWithTwoStarComment() {} // violation
136 }