View Javadoc
1   /*
2   ConstructorsDeclarationGrouping
3   
4   
5   */
6   
7   package com.puppycrawl.tools.checkstyle.checks.coding.constructorsdeclarationgrouping;
8   
9   public class InputConstructorsDeclarationGrouping {
10  
11      int a;
12  
13      int b;
14  
15      void foo() {}
16  
17      InputConstructorsDeclarationGrouping() {}
18  
19      InputConstructorsDeclarationGrouping(String a) {}
20  
21      void foo2() {}
22  
23      InputConstructorsDeclarationGrouping(int a) {}
24      // violation above 'Constructors should be grouped together.*'
25  
26      int abc;
27  
28      InputConstructorsDeclarationGrouping(double x) {}
29      // violation above 'Constructors should be grouped together.*'
30  
31      private enum InnerEnum1 {
32  
33          one;
34  
35          int x;
36  
37          InnerEnum1() {}
38  
39          InnerEnum1(String f) {}
40  
41          String str;
42  
43          String str2;
44  
45          InnerEnum1(int x) {}
46          // violation above 'Constructors should be grouped together.*'
47  
48          private abstract class Inner {
49              Inner() {}
50  
51              int x;
52  
53              String neko;
54  
55              Inner(String g) {}
56              // violation above 'Constructors should be grouped together.*'
57          }
58  
59          InnerEnum1(double d) {}
60          // violation above 'Constructors should be grouped together.*'
61      }
62  
63      InputConstructorsDeclarationGrouping(float x) {}
64      // violation above 'Constructors should be grouped together.*'
65  
66      InputConstructorsDeclarationGrouping(long l) {}
67      // violation above 'Constructors should be grouped together.*'
68  
69  }