View Javadoc
1   package com.google.checkstyle.test.chapter5naming.rule525nonconstantfieldnames;
2   import java.io.*;
3   
4   final class InputSimple
5   {
6   
7       public static final int badConstant = 2;
8   
9       public static final int MAX_ROWS = 2;
10  
11      
12      private int bad$Static = 2; //warn
13     
14      private static int sum_Created = 0;
15  
16     
17      private int bad_Member = 2; //warn
18  
19      private int m = 0; //warn
20  
21      protected int m_M = 0; //warn
22  
23  
24      private int[] m$nts = new int[] {1,2, 3, //warn
25                                       4};
26  
27  
28      public static int sTest1;
29  
30      protected static int sTest3;
31  
32      static int sTest2;
33  
34  
35      int mTest1; //warn
36  
37      public int mTest2; //warn
38      
39      public int $mTest2; //warn
40      
41      public int mTes$t2; //warn
42  
43      public int mTest2$; //warn
44      
45      /** test local variables. This Check doesn't verify local variables, only members.*/
46      private void localVariables()
47      {
48          int a;
49          int aA;
50          int a1_a;
51          int A_A;
52          int aa2_a;
53          int _a;
54          int _aa;
55          int aa_;
56          int aaa$aaa;
57          int $aaaaaa;
58          int aaaaaa$;
59          
60          int aa;
61          int aaAa1a;
62          int aaAaaAa2a1;
63      }
64      
65      interface Foo {
66          public void greet();
67      
68      }
69      
70      class InnerClass
71      {
72          public static final int badConstant = 2;
73  
74          public static final int MAX_ROWS = 2;
75  
76          
77          private int bad$Static = 2; //warn
78         
79          private  int sum_Created = 0; //warn
80  
81         
82          private int bad_Member = 2; //warn
83  
84          private int m = 0; //warn
85  
86          protected int m_M = 0; //warn
87  
88  
89          private int[] m$nts = new int[] {1,2, 3, //warn
90                                           4};
91  
92  
93          int mTest1; //warn
94  
95          public int mTest2; //warn
96          
97          public int $mTest2; //warn
98          
99          public int mTes$t2; //warn
100 
101         public int mTest2$; //warn
102         
103         void fooMethod()
104         {
105             Foo foo = new Foo() {
106                     
107                     int bad$Static = 2; //warn
108                    
109                     int sum_Created = 0; //warn
110 
111                    
112                     int bad_Member = 2; //warn
113 
114                     int m = 0; //warn
115 
116                     int m_M = 0; //warn
117 
118 
119                     int[] m$nts = new int[] {1,2, 3, //warn
120                                                      4};
121 
122 
123                     int mTest1; //warn
124 
125                     int mTest2; //warn
126                     
127                     int $mTest2; //warn
128                     
129                     int mTes$t2; //warn
130 
131                     int mTest2$; //warn
132 
133                     public void greet() {}
134             };
135         }
136     }
137 }