1 22 package org.jboss.test.mx.mxbean.support; 23 24 import java.math.BigDecimal ; 25 import java.math.BigInteger ; 26 import java.util.Date ; 27 28 import javax.management.ObjectName ; 29 30 import org.jboss.mx.util.ObjectNameFactory; 31 import org.jboss.test.mx.mxbean.test.AbstractMXBeanTest; 32 33 39 public interface SimpleInterface 40 { 41 String BIG_DECIMAL = "bigDecimal"; 42 43 BigDecimal bigDecimalValue = new BigDecimal ("12e4"); 44 BigDecimal bigDecimalChangedValue = new BigDecimal ("12e5"); 45 46 String BIG_INTEGER = "bigInteger"; 47 48 BigInteger bigIntegerValue = new BigInteger ("123456"); 49 BigInteger bigIntegerChangedValue = new BigInteger ("123457"); 50 51 String BOOLEAN = "boolean"; 52 53 Boolean booleanValue = Boolean.TRUE; 54 Boolean booleanChangedValue = Boolean.FALSE; 55 56 String BOOLEAN_PRIMITIVE = "primitiveBoolean"; 57 58 boolean primitiveBooleanValue = booleanValue.booleanValue(); 59 boolean primitiveBooleanChangedValue = booleanChangedValue.booleanValue(); 60 61 String BYTE = "byte"; 62 63 Byte byteValue = new Byte ("12"); 64 Byte byteChangedValue = new Byte ("13"); 65 66 String BYTE_PRIMITIVE = "primitiveByte"; 67 68 byte primitiveByteValue = byteValue.byteValue(); 69 byte primitiveByteChangedValue = byteChangedValue.byteValue(); 70 71 String CHARACTER = "character"; 72 73 Character characterValue = new Character ('a'); 74 Character characterChangedValue = new Character ('b'); 75 76 String CHAR_PRIMITIVE = "primitiveChar"; 77 78 char primitiveCharValue = characterValue.charValue(); 79 char primitiveCharChangedValue = characterChangedValue.charValue(); 80 81 String DATE = "date"; 82 83 Date dateValue = AbstractMXBeanTest.createDate(2001, 1, 1); 84 Date dateChangedValue = AbstractMXBeanTest.createDate(2002, 2, 2); 85 86 String DOUBLE = "double"; 87 88 Double doubleValue = new Double ("3.14e12"); 89 Double doubleChangedValue = new Double ("3.14e13"); 90 91 String DOUBLE_PRIMITIVE = "primitiveDouble"; 92 93 double primitiveDoubleValue = doubleValue.doubleValue(); 94 double primitiveDoubleChangedValue = doubleChangedValue.doubleValue(); 95 96 String FLOAT = "float"; 97 98 Float floatValue = new Float ("3.14"); 99 Float floatChangedValue = new Float ("3.15"); 100 101 String FLOAT_PRIMITIVE = "primitiveFloat"; 102 103 float primitiveFloatValue = floatValue.floatValue(); 104 float primitiveFloatChangedValue = floatChangedValue.floatValue(); 105 106 String INTEGER = "integer"; 107 108 Integer integerValue = new Integer ("1234"); 109 Integer integerChangedValue = new Integer ("1235"); 110 111 String INT_PRIMITIVE = "primitiveInt"; 112 113 int primitiveIntValue = integerValue.intValue(); 114 int primitiveIntChangedValue = integerChangedValue.intValue(); 115 116 String LONG = "long"; 117 118 Long longValue = new Long ("12345"); 119 Long longChangedValue = new Long ("12346"); 120 121 String LONG_PRIMITIVE = "primitiveLong"; 122 123 long primitiveLongValue = longValue.longValue(); 124 long primitiveLongChangedValue = longChangedValue.longValue(); 125 126 String OBJECT_NAME = "objectName"; 127 128 ObjectName objectNameValue = ObjectNameFactory.create("domain:key=property"); 129 ObjectName objectNameChangedValue = ObjectNameFactory.create("domain:key=property2"); 130 131 String SHORT = "short"; 132 133 Short shortValue = new Short ("123"); 134 Short shortChangedValue = new Short ("124"); 135 136 String SHORT_PRIMITIVE = "primitiveShort"; 137 138 short primitiveShortValue = shortValue.shortValue(); 139 short primitiveShortChangedValue = shortChangedValue.shortValue(); 140 141 String STRING = "string"; 142 143 String stringValue = new String ("StringValue"); 144 String stringChangedValue = new String ("ChangedValue"); 145 146 String [] KEYS = 147 { 148 BIG_DECIMAL, 149 BIG_INTEGER, 150 BOOLEAN, 151 BOOLEAN_PRIMITIVE, 152 BYTE, 153 BYTE_PRIMITIVE, 154 CHARACTER, 155 CHAR_PRIMITIVE, 156 DATE, 157 DOUBLE, 158 DOUBLE_PRIMITIVE, 159 FLOAT, 160 FLOAT_PRIMITIVE, 161 INTEGER, 162 INT_PRIMITIVE, 163 LONG, 164 LONG_PRIMITIVE, 165 OBJECT_NAME, 166 SHORT, 167 SHORT_PRIMITIVE, 168 STRING 169 }; 170 171 Object [] VALUES = 172 { 173 bigDecimalValue, 174 bigIntegerValue, 175 booleanValue, 176 primitiveBooleanValue, 177 byteValue, 178 primitiveByteValue, 179 characterValue, 180 primitiveCharValue, 181 dateValue, 182 doubleValue, 183 primitiveDoubleValue, 184 floatValue, 185 primitiveFloatValue, 186 integerValue, 187 primitiveIntValue, 188 longValue, 189 primitiveLongValue, 190 objectNameValue, 191 shortValue, 192 primitiveShortValue, 193 stringValue 194 }; 195 196 Object [] CHANGED_VALUES = 197 { 198 bigDecimalChangedValue, 199 bigIntegerChangedValue, 200 booleanChangedValue, 201 primitiveBooleanChangedValue, 202 byteChangedValue, 203 primitiveByteChangedValue, 204 characterChangedValue, 205 primitiveCharChangedValue, 206 dateChangedValue, 207 doubleChangedValue, 208 primitiveDoubleChangedValue, 209 floatChangedValue, 210 primitiveFloatChangedValue, 211 integerChangedValue, 212 primitiveIntChangedValue, 213 longChangedValue, 214 primitiveLongChangedValue, 215 objectNameChangedValue, 216 shortChangedValue, 217 primitiveShortChangedValue, 218 stringChangedValue 219 }; 220 221 Class [] TYPES = 222 { 223 BigDecimal .class, 224 BigInteger .class, 225 Boolean .class, 226 Boolean.TYPE, 227 Byte .class, 228 Byte.TYPE, 229 Character .class, 230 Character.TYPE, 231 Date .class, 232 Double .class, 233 Double.TYPE, 234 Float .class, 235 Float.TYPE, 236 Integer .class, 237 Integer.TYPE, 238 Long .class, 239 Long.TYPE, 240 ObjectName .class, 241 Short .class, 242 Short.TYPE, 243 String .class 244 }; 245 246 Object [] NULL_VALUES = 247 { 248 null, 249 null, 250 null, 251 null, 252 null, 253 null, 254 null, 255 null, 256 null, 257 null, 258 null, 259 null, 260 null, 261 null, 262 null, 263 null, 264 null, 265 null, 266 null, 267 null, 268 null 269 }; 270 271 Object [] LEGAL_NULL_VALUES = 272 { 273 null, 274 null, 275 null, 276 primitiveBooleanValue, 277 null, 278 primitiveByteValue, 279 null, 280 primitiveCharValue, 281 null, 282 null, 283 primitiveDoubleValue, 284 null, 285 primitiveFloatValue, 286 null, 287 primitiveIntValue, 288 null, 289 primitiveLongValue, 290 null, 291 null, 292 primitiveShortValue, 293 null, 294 }; 295 296 BigDecimal getBigDecimal(); 297 298 BigInteger getBigInteger(); 299 300 boolean isPrimitiveBoolean(); 301 302 Boolean getBoolean(); 303 304 byte getPrimitiveByte(); 305 306 Byte getByte(); 307 308 char getPrimitiveChar(); 309 310 Character getCharacter(); 311 312 Date getDate(); 313 314 double getPrimitiveDouble(); 315 316 Double getDouble(); 317 318 float getPrimitiveFloat(); 319 320 Float getFloat(); 321 322 int getPrimitiveInt(); 323 324 Integer getInteger(); 325 326 long getPrimitiveLong(); 327 328 Long getLong(); 329 330 ObjectName getObjectName(); 331 332 short getPrimitiveShort(); 333 334 Short getShort(); 335 336 String getString(); 337 } 338 | Popular Tags |