View Javadoc
1   /*
2   ConstructorsDeclarationGrouping
3   
4   
5   */
6   
7   package com.puppycrawl.tools.checkstyle.checks.coding.constructorsdeclarationgrouping;
8   
9   public class InputConstructorsDeclarationGroupingInner {
10  
11      InputConstructorsDeclarationGroupingInner() {}
12  
13      private class Inner {
14          Inner() {}
15  
16          Inner(String str) {}
17  
18          // Comments are allowed between constructors.
19          Inner(int x) {}
20      }
21  
22      private class Inner2 {
23          Inner2() {}
24  
25          Inner2(String str) {}
26  
27          int x;
28  
29          Inner2(int x) {}
30          // violation above 'Constructors should be grouped together.*'
31  
32          String xx;
33  
34          Inner2(double d) {}
35          // violation above 'Constructors should be grouped together.*'
36  
37          Inner2(float f) {}
38          // violation above 'Constructors should be grouped together.*'
39      }
40  
41      InputConstructorsDeclarationGroupingInner(long l, double d) {}
42      // violation above 'Constructors should be grouped together.*'
43  
44      InputConstructorsDeclarationGrouping annoynmous = new InputConstructorsDeclarationGrouping() {
45          int x;
46          void test() {}
47          void test2() {}
48      };
49  
50      private enum InnerEnum2 {
51          ONE,TWO,THREE;
52          void test() {}
53          void test2() {}
54          void test3() {}
55      }
56  
57      private enum InnerEnum3 {
58          InnerEnum3() {}
59      }
60  
61      private enum InnerEnum4 {}
62  
63      private class Inner3 {
64          void test() {}
65          void test2() {}
66          void test3() {}
67      }
68  
69      private class Inner4 {
70          Inner4() {}
71      }
72  
73      private class Inner5 {}
74  }