1 package net.ubiquity.tools.checkstyle.tests; 2 3 public class InputDeclarationOrder 4 { 5 static final int FOO2 = 3; 6 7 public static final int FOO = 3; 9 10 private static final int FOO3 = 3; 11 12 public static final int FOO4 = 3; 14 15 private static final String ERROR = "error"; 16 17 protected static final String ERROR1 = "error"; 19 20 public static final String WARNING = "warning"; 22 23 private int mMaxInitVars = 3; 24 25 public static final int MAX_ITER_VARS = 3; 28 29 private class InnerClass 30 { 31 private static final int INNER_FOO = 2; 32 33 public static final int INNER_FOO2 = 2; 35 36 public InnerClass() 37 { 38 int foo = INNER_FOO; 39 foo += INNER_FOO2; 40 foo += INNER_FOO3; 41 } 42 43 public static final int INNER_FOO3 = 2; 46 } 47 48 public int getFoo1() 49 { 50 return mFoo; 51 } 52 53 public InputDeclarationOrder() 55 { 56 String foo = ERROR; 57 foo += ERROR1; 58 foo += WARNING; 59 int fooInt = mMaxInitVars; 60 fooInt += MAX_ITER_VARS; 61 fooInt += mFoo; 62 } 63 64 public static int getFoo2() 65 { 66 return 13; 67 } 68 69 public int getFoo() 70 { 71 return mFoo; 72 } 73 74 private static int getFoo21() 75 { 76 return 14; 77 } 78 79 private int mFoo = 0; 81 } 82 83 enum InputDeclarationOrderEnum 84 { 85 ENUM_VALUE_1, 86 ENUM_VALUE_2, 87 ENUM_VALUE_3 88 { 89 private static final int INNER_FOO = 2; 90 91 public static final int INNER_FOO2 = 2; 93 94 public void doIt() 95 { 96 } 97 98 public static final int INNER_FOO3 = 2; 101 }; 102 103 static final int FOO2 = 3; 104 105 public static final int FOO = 3; 107 108 private static final int FOO3 = 3; 109 110 public static final int FOO4 = 3; 112 113 private static final String ERROR = "error"; 114 115 protected static final String ERROR1 = "error"; 117 118 public static final String WARNING = "warning"; 120 121 private int mMaxInitVars = 3; 122 123 public static final int MAX_ITER_VARS = 3; 126 127 private class InnerClass 128 { 129 private static final int INNER_FOO = 2; 130 131 public static final int INNER_FOO2 = 2; 133 134 public InnerClass() 135 { 136 int foo = INNER_FOO; 137 foo += INNER_FOO2; 138 foo += INNER_FOO3; 139 } 140 141 public static final int INNER_FOO3 = 2; 144 } 145 146 public int getFoo1() 147 { 148 return mFoo; 149 } 150 151 InputDeclarationOrderEnum() 153 { 154 String foo = ERROR; 155 foo += ERROR1; 156 foo += WARNING; 157 int fooInt = mMaxInitVars; 158 fooInt += MAX_ITER_VARS; 159 fooInt += mFoo; 160 } 161 162 public static int getFoo2() 163 { 164 return 2; 165 } 166 167 public int getFoo() 168 { 169 return mFoo; 170 } 171 172 private static int getFoo21() 173 { 174 return 1; 175 } 176 177 private int mFoo = 0; 179 } 180 | Popular Tags |