1 5 package com.tctest; 6 7 import com.tc.object.config.ConfigVisitor; 8 import com.tc.object.config.DSOClientConfigHelper; 9 import com.tc.object.config.TransparencyClassSpec; 10 import com.tc.simulator.app.ApplicationConfig; 11 import com.tc.simulator.listener.ListenerProvider; 12 import com.tc.util.Assert; 13 import com.tctest.runner.AbstractTransparentApp; 14 15 import java.io.File ; 16 import java.math.BigDecimal ; 17 import java.math.BigInteger ; 18 import java.util.ArrayList ; 19 import java.util.Collection ; 20 import java.util.Collections ; 21 import java.util.Date ; 22 import java.util.HashMap ; 23 import java.util.HashSet ; 24 import java.util.List ; 25 import java.util.Map ; 26 import java.util.Set ; 27 import java.util.Vector ; 28 29 32 public class TransparencyTestApp extends AbstractTransparentApp { 33 34 private Map myRoot; 35 private Object out; 36 private static Object err; 37 38 public TransparencyTestApp(String appId, ApplicationConfig cfg, ListenerProvider listenerProvider) { 39 super(appId, cfg, listenerProvider); 40 System.err.println("APPID is " + appId); 41 } 42 43 public static void visitL1DSOConfig(ConfigVisitor visitor, DSOClientConfigHelper config) { 44 config.getOrCreateSpec("com.sun.jmx.mbeanserver.RepositorySupport"); 45 46 String testAppName = TransparencyTestApp.class.getName(); 47 config.addIncludePattern(testAppName); 48 config.addIncludePattern(testAppName + "$*"); 49 50 TransparencyClassSpec appSpec = config.getOrCreateSpec("com.tctest.TransparencyTestApp"); 51 appSpec.addRoot("myRoot", "rootBabyRoot"); 52 appSpec.addRoot("vector", "vector"); 53 appSpec.addRoot("out", "out"); 54 55 TransparencyClassSpec spec = config.getOrCreateSpec("com.tctest.TransparencyTestApp$TestObj"); 56 57 spec.addTransient("transientObject"); 58 spec.addTransient("transientPrimitive"); 59 config.addWriteAutolock("* com.tctest.TransparencyTestApp.*(..)"); 60 config.addWriteAutolock("* com.tctest.AbstractTransparencyApp.*(..)"); 61 62 config.getOrCreateSpec(FunnyCstr.class.getName()); 63 config.getOrCreateSpec(FunnyBase.class.getName()); 64 } 65 66 public void run() { 67 out = new Object (); 69 System.out.println("out is: " + out); 70 System.err.println("err is: " + err); 71 72 myRoot = new HashMap (); 73 synchronized (myRoot) { 74 test1(); 75 Vector v = new Vector (); 76 v.add("Hello Steve"); 77 testFunnyInner(); 78 testFunnyCstr(); 79 } 80 81 } 82 83 FunnyCstr funnyCstr; 84 85 private void testFunnyCstr() { 86 funnyCstr = new FunnyCstr(new Object [] { this }, new Object (), true); 87 } 88 89 interface Foo { 90 public Object foo(); 91 } 92 93 Foo inner; 94 95 private void testFunnyInner() { 96 class Inner implements Foo { 97 98 class Nested implements Foo { 99 public Object foo() { 100 return this; 101 } 102 } 103 104 public Object foo() { 105 return new Nested(); 106 } 107 } 108 109 inner = new Inner(); 110 inner = (Foo) inner.foo(); 111 } 112 113 public void test1() { 114 System.out.println("Entering test1"); 115 if (!myRoot.containsKey("value")) { 116 myRoot.put("value", "1"); 117 Map fullMap = new HashMap (); 118 fullMap.put("1", new TestObj(new TestObj(null))); 119 fullMap.put(new TestObj(new TestObj(null)), new TestObj(new TestObj(null))); 120 fullMap.put("3", "4"); 121 fullMap.put("5", Collections.EMPTY_LIST); 122 myRoot.put("testMapWithstuff", fullMap); 123 System.out.println("Entering test2 put"); 124 } 125 126 if (myRoot.get("value").equals("1")) { 127 System.out.println("1"); 128 System.out.println("Creating test objects and putting them in the map"); 129 TestObj testObjectEmpty = new TestObj(new TestObj(null)); 130 TestObj testObjectFull = initialize(new TestObj(new TestObj(null))); 131 myRoot.put("testObjectEmpty", testObjectEmpty); 132 System.out.println("BEGIN ADD TO ROOT:"); 133 myRoot.put("testObjectFull", testObjectFull); 134 System.out.println("END ADD TO ROOT:"); 135 myRoot.put("InitializeEmpty", null); 136 myRoot.put("value", "2"); 137 return; 138 } 139 140 if (myRoot.get("value").equals("2")) { 141 System.out.println("2"); 142 System.out.println("Checking to make sure the stuff we put in is there and that nothing extra is there"); 143 Assert.eval((TestObj) myRoot.get("testObject") == null); 144 Assert.eval((TestObj) myRoot.get("testObjectEmpty") != null); 145 Assert.eval((TestObj) myRoot.get("testObjectFull") != null); 146 147 System.out.println("Checking to make sure full is full"); 148 TestObj full = (TestObj) myRoot.get("testObjectFull"); 149 150 verifyFull(full); 151 152 System.out.println("putting stuff in the empty one"); 153 TestObj testObjectEmpty = (TestObj) myRoot.get("testObjectEmpty"); 154 initialize(testObjectEmpty); 155 myRoot.put("VerifyEmptyFull", null); 156 myRoot.remove("InitializeEmpty"); 157 myRoot.put("value", "3"); 158 return; 159 } 160 161 if (myRoot.get("value").equals("3")) { 162 System.out.println("3"); 163 TestObj testObjectEmpty = (TestObj) myRoot.get("testObjectEmpty"); 164 verifyFull(testObjectEmpty); 165 initialize2(testObjectEmpty); 166 myRoot.remove("VerifyEmptyFull"); 167 myRoot.put("VerifyInitialize2", null); 168 System.out.println("Verified Empty Now Full"); 169 myRoot.put("value", "4"); 170 return; 171 } 172 if (myRoot.get("value").equals("4")) { 173 System.out.println("4"); 174 TestObj testObjectEmpty = (TestObj) myRoot.get("testObjectEmpty"); 175 verifyFull2(testObjectEmpty); 176 System.out.println("Verified Empty Now Full"); 177 myRoot.put("value", "5"); 178 } 179 } 180 181 private TestObj initialize(TestObj obj) { 182 183 class NamedSubclass implements Runnable { 184 public void run() { 185 System.out.println("Hello world"); 186 } 187 } 188 189 obj.namedSubclass = new NamedSubclass(); 190 obj.setSyncMap(Collections.synchronizedMap(new HashMap ())); 191 obj.setSyncSet(Collections.synchronizedSet(new HashSet ())); 192 obj.setSyncList(Collections.synchronizedList(new ArrayList ())); 193 obj.setSyncCollection(Collections.synchronizedCollection(new ArrayList ())); 194 195 System.setProperty("steve", "prop1"); 196 obj.setClassObject(Object .class); 197 obj.setSqlDate(new java.sql.Date (10)); 198 obj.setTransientObject(new HashMap ()); 199 obj.setTransientPrimitive(101L); 200 obj.setObjectArray(new Object [5]); 201 obj.setObjectArray(1, new File ("hello")); 202 obj.setObjectArray(2, new Character ('b')); 203 204 Date [] dates = new Date [2]; 205 obj.setFile(new File ("yellow")); 206 obj.setDates(dates); 207 obj.setDate(0, new Date ()); 208 209 obj.setCharacters(new Character [2]); 210 obj.setCharacter(0, new Character ('c')); 211 212 obj.setDate(new Date ()); 213 obj.setLiteralObject(new Long (0)); 214 obj.setBooleanObject(new Boolean (true)); 215 obj.setBooleanValue(true); 216 obj.setByteObject(new Byte ((byte) 1)); 217 obj.setByteValue((byte) 2); 218 obj.setCharValue('a'); 219 obj.setCharObject(new Character ('b')); 220 obj.setDoubleObject(new Double (1.1)); 221 obj.setDoubleValue(1.2); 222 obj.floatObject = new Float (2.1); 223 obj.setFloatValue((float) 2.2); 224 obj.integerObject = new Integer (3); 226 obj.setIntegerValue(4); 227 obj.longObject = new Long (5); 228 obj.setLongValue(6); 229 obj.setShortObject(new Short ((short) 7)); 230 obj.setShortValue((short) 8); 231 obj.setStringValue("Steve"); 232 obj.setObjects(new TestObj[1]); 233 TestObj to = new TestObj(null); 234 to.setStringValue("cool"); 235 obj.setObject(0, to); 236 obj.setLongs(new long[4]); 237 obj.setLong(2, 4); 238 obj.setInts(new int[6]); 239 obj.setInt(3, 6); 240 obj.ints2 = new int[6]; 241 System.arraycopy(obj.ints, 0, obj.ints2, 0, 6); 242 obj.setDoubles(new double[8]); 243 obj.setDouble(4, 8); 244 obj.setShorts(new short[10]); 245 obj.setShort(5, (short) 10); 246 obj.setBooleans(new boolean[12]); 247 obj.setBoolean(6, true); 248 obj.setBytes(new byte[14]); 249 obj.setByte(7, (byte) 14); 250 obj.setFloats(new float[16]); 251 obj.setFloat(8, 16); 252 obj.setChars(new char[18]); 253 obj.setChar(9, 'A'); 254 obj.setTwoDobjects(new TestObj[6][4]); 255 to = new TestObj(null); 256 to.setStringValue("baby"); 257 obj.setTwoDobject(4, 2, to); 258 obj.bigIntegerObject = new BigInteger ("100"); 259 obj.bigDecimalObject = new BigDecimal (100.0); 260 return obj; 261 } 262 263 private TestObj initialize2(TestObj obj) { 264 System.setProperty("steve", "prop2"); 265 266 obj.getSyncMap().put("Hello", "Steve"); 267 obj.getSyncList().add("Hello"); 268 obj.getSyncSet().add("Hello"); 269 obj.getSyncCollection().add("Hello"); 270 271 obj.setClassObject(Integer .class); 272 obj.setSqlDate(new java.sql.Date (11)); 273 obj.setTransientObject(new Date ()); 274 obj.setTransientPrimitive(1011L); 275 276 obj.setObjectArray(2, new File ("hello")); 277 obj.setObjectArray(1, new Character ('b')); 278 279 obj.setFile(new File ("yellow")); 280 obj.setDate(1, new Date ()); 281 obj.setCharacter(1, new Character ('d')); 282 obj.setDate(new Date ()); 283 obj.setLiteralObject("Steve"); 284 obj.setBooleanObject(new Boolean (false)); 285 obj.setBooleanValue(false); 286 obj.setByteObject(new Byte ((byte) 2)); 287 obj.setByteValue((byte) 3); 288 obj.setCharValue('e'); 289 obj.setCharObject(new Character ('f')); 290 obj.doubleObject = new Double (5.1); 292 obj.setDoubleValue(6.2); 293 obj.setFloatObject(new Float (7.1)); 294 obj.setFloatValue((float) 8.2); 295 obj.setIntegerObject(new Integer (9)); 296 obj.setIntegerValue(10); 297 obj.setLongObject(new Long (11)); 298 obj.setLongValue(6); 299 obj.setShortObject(new Short ((short) 12)); 300 obj.setShortValue((short) 13); 301 obj.setStringValue("Steve2"); 302 TestObj to = obj.getObject(0); 303 to.setStringValue("cool2"); 304 obj.setObject(0, to); 305 obj.setLong(2, 3); 306 obj.setInt(3, 5); 307 obj.setDouble(4, 7); 308 obj.setShort(5, (short) 9); 309 obj.setBoolean(6, false); 310 obj.setByte(7, (byte) 13); 311 obj.setFloat(8, 15); 312 obj.setChar(9, 'B'); 313 to = obj.getTwoDobject(4, 2); 314 to.setStringValue("baby2"); 315 final Object outer = new Object (); 316 final float oneInt = 100; 317 final char oneChar = 'c'; 318 new Thread (new Runnable () { 319 public void run() { 320 System.out.println(outer + " " + oneInt + " one:" + oneChar); 321 } 322 }).start(); 323 obj.setTwoDobject(5, 1, new TestObj(null)); 324 obj.setBigIntegerObject(new BigInteger ("200")); 325 obj.setBigDecimalObject(new BigDecimal (200.0)); 326 return obj; 327 } 328 329 private void verifyFull2(TestObj obj) { 330 331 Assert.eval(obj.getSyncMap().containsKey("Hello")); 332 Assert.eval(obj.getSyncMap().get("Hello").equals("Steve")); 333 334 Assert.eval(obj.getSyncSet().contains("Hello")); 335 Assert.eval(obj.getSyncList().contains("Hello")); 336 Assert.eval(obj.getSyncCollection().contains("Hello")); 337 338 Assert.eval(obj.getSqlDate().getTime() == 11); 339 Assert.eval(Integer .class.equals(obj.getClassObject())); 340 Assert.eval(obj.getTransientObject() == null); 341 Assert.eval(obj.getTransientPrimitive() == 0); 342 Assert.eval(obj.getObjectArray(2).equals(new File ("hello"))); 343 Assert.eval(obj.getObjectArray(1).equals(new Character ('b'))); 344 345 Assert.eval(obj.getFile().equals(new File ("yellow"))); 346 Assert.eval(System.getProperty("steve").equals("prop2")); 347 Assert.eval(obj.getCharacter(0).equals(new Character ('c'))); 348 Assert.eval(obj.getCharacter(1).equals(new Character ('d'))); 349 350 Assert.eval(obj.getDate() != null); 351 Assert.eval(obj.getDate(0) != null); 352 Assert.eval(obj.getDate(1) != null); 353 Assert.eval(obj.getLiteralObject().equals("Steve")); 354 Assert.eval(obj.getBooleanObject().equals(new Boolean (false))); 355 Assert.eval(obj.getBooleanValue() == false); 356 Assert.eval(obj.getByteObject().equals(new Byte ((byte) 2))); 357 Assert.eval(obj.getByteValue() == (byte) 3); 358 Assert.eval(obj.getCharValue() == 'e'); 359 Assert.eval(obj.getCharObject().equals(new Character ('f'))); 360 Assert.eval(obj.getDoubleObject().equals(new Double (5.1))); 361 Assert.eval(obj.getDoubleValue() == 6.2); 362 Assert.eval(obj.getFloatObject().equals(new Float (7.1))); 363 Assert.eval(obj.getFloatValue() == (float) 8.2); 364 Assert.eval(obj.getIntegerObject().equals(new Integer (9))); 365 Assert.eval(obj.getIntegerValue() == 10); 366 Assert.eval(obj.getLongObject().equals(new Long (11))); 367 Assert.eval(obj.getLongValue() == 6); 368 Assert.eval(obj.getShortObject().equals(new Short ((short) 12))); 369 Assert.eval(obj.getShortValue() == (short) 13); 370 Assert.eval(obj.getStringValue().equals("Steve2")); 371 Assert.eval(obj.getObjects().length == 1); 372 Assert.eval((obj.getObject(0)).getStringValue().equals("cool2")); 373 Assert.eval(obj.getBigIntegerObject().equals(new BigInteger ("200"))); 374 Assert.eval(obj.getBigDecimalObject().equals(new BigDecimal (200.0))); 375 376 Assert.eval(obj.getInts().length == 6); 377 System.out.println("Got value:" + obj.getInt(3) + " array:" + obj.getInts()); 378 Assert.eval(obj.getInt(3) == 5); 379 380 Assert.eval(obj.getLongs().length == 4); 381 Assert.eval(obj.getLong(2) == 3); 382 383 Assert.eval(obj.getDoubles().length == 8); 384 Assert.eval(obj.getDouble(4) == 7); 385 Assert.eval(obj.getShorts().length == 10); 386 Assert.eval(obj.getShort(5) == (short) 9); 387 Assert.eval(obj.getBooleans().length == 12); 388 Assert.eval(!obj.getBoolean(6)); 389 Assert.eval(obj.getBytes().length == 14); 390 Assert.eval(obj.getByte(7) == (byte) 13); 391 Assert.eval(obj.getFloats().length == 16); 392 Assert.eval(obj.getFloat(8) == 15); 393 Assert.eval(obj.getChars().length == 18); 394 Assert.eval(obj.getChar(9) == 'B'); 395 Assert.eval(obj.getTwoDobjects().length == 6); 396 System.out.println("About to check 2d"); 397 Assert.eval(obj.getTwoDobjects()[0].length == 4); 398 Assert.eval(obj.getTwoDobject(4, 2).getStringValue().equals("baby2")); 399 System.out.println("Checked 2d"); 400 } 401 402 private void verifyFull(TestObj obj) { 403 404 Assert.eval(obj.getSyncMap() != null); 405 Assert.eval(obj.getSyncSet() != null); 406 Assert.eval(obj.getSyncCollection() != null); 407 Assert.eval(obj.getSyncList() != null); 408 409 Assert.eval(obj.getTransientObject() == null); 410 Assert.eval(Object .class.equals(obj.getClassObject())); 411 Assert.eval(obj.getSqlDate().getTime() == 10); 412 System.out.println("Got:" + obj.getTransientPrimitive()); 413 Assert.eval(obj.getTransientPrimitive() == 0); 414 Assert.eval(obj.getObjectArray(1).equals(new File ("hello"))); 415 Assert.eval(obj.getObjectArray(2).equals(new Character ('b'))); 416 Assert.eval(obj.getFile().equals(new File ("yellow"))); 417 Assert.eval(System.getProperty("steve").equals("prop1")); 418 Assert.eval(obj.getCharacter(0).equals(new Character ('c'))); 419 Assert.eval(obj.getCharacter(1) == null); 420 Assert.eval(obj.getDate() != null); 421 Assert.eval(obj.getDate(0) != null); 422 Assert.eval(obj.getDate(1) == null); 423 Assert.eval(obj.getLiteralObject().equals(new Long (0))); 424 Assert.eval(obj.getBooleanObject().equals(new Boolean (true))); 425 Assert.eval(obj.getBooleanValue() == true); 426 Assert.eval(obj.getByteObject().equals(new Byte ((byte) 1))); 427 Assert.eval(obj.getByteValue() == (byte) 2); 428 Assert.eval(obj.getCharValue() == 'a'); 429 Assert.eval(obj.getCharObject().equals(new Character ('b'))); 430 Assert.eval(obj.getDoubleObject().equals(new Double (1.1))); 431 Assert.eval(obj.getDoubleValue() == 1.2); 432 Assert.eval(obj.floatObject.equals(new Float (2.1))); 433 Assert.eval(obj.getFloatValue() == (float) 2.2); 434 Assert.eval(obj.getIntegerObject().equals(new Integer (3))); 435 Assert.eval(obj.integerValue == 4); 436 Assert.eval(obj.getLongObject().equals(new Long (5))); 437 Assert.eval(obj.getLongValue() == 6); 438 Assert.eval(obj.getShortObject().equals(new Short ((short) 7))); 439 Assert.eval(obj.getShortValue() == (short) 8); 440 Assert.eval(obj.getStringValue().equals("Steve")); 441 Assert.eval(obj.getObjects().length == 1); 442 Assert.eval((obj.getObject(0)).getStringValue().equals("cool")); 443 Assert.eval(obj.bigIntegerObject.equals(new BigInteger ("100"))); 444 Assert.eval(obj.bigDecimalObject.equals(new BigDecimal (100.0))); 445 446 Assert.eval(obj.getInts().length == 6); 447 System.out.println("Got value:" + obj.getInt(3) + " array:" + obj.getInts()); 448 Assert.eval(obj.getInt(3) == 6); 449 Assert.eval(obj.ints2[3] == 6); 450 Assert.eval(obj.getLongs().length == 4); 451 Assert.eval(obj.getLong(2) == 4); 452 453 Assert.eval(obj.getDoubles().length == 8); 454 Assert.eval(obj.getDouble(4) == 8); 455 Assert.eval(obj.getShorts().length == 10); 456 Assert.eval(obj.getShort(5) == (short) 10); 457 Assert.eval(obj.getBooleans().length == 12); 458 Assert.eval(obj.getBoolean(6)); 459 Assert.eval(obj.getBytes().length == 14); 460 Assert.eval(obj.getByte(7) == (byte) 14); 461 Assert.eval(obj.getFloats().length == 16); 462 Assert.eval(obj.getFloat(8) == 16); 463 Assert.eval(obj.getChars().length == 18); 464 Assert.eval(obj.getChar(9) == 'A'); 465 Assert.eval(obj.getTwoDobjects().length == 6); 466 System.out.println("About to check 2d"); 467 Assert.eval(obj.getTwoDobjects()[0].length == 4); 468 Assert.eval(obj.getTwoDobject(4, 2).getStringValue().equals("baby")); 469 System.out.println("Checked 2d"); 470 } 471 472 private static class FunnyBase { 473 FunnyBase(Object object, Object arg2) { 474 } 476 } 477 478 private static class FunnyCstr extends FunnyBase { 479 public FunnyCstr(Object [] arg1, Object arg2, boolean b) { 483 super(FunnyCstr.foo(arg1[0], b), arg2); 484 } 485 486 private static Object foo(Object object, boolean b) { 487 return object; 488 } 489 } 490 491 public class TestObj { 492 493 public void __tc_getallfieldvalues(Map values) { 494 values.put("transientObject", transientObject); 495 values.put("transientPrimitive", new Long (transientPrimitive)); 496 } 497 498 public void __tc_setfieldvalue(String fieldName, Object value) { 499 if (fieldName.equals("transientObject")) { 500 this.transientObject = value; 501 } 502 if (fieldName.equals("transientPrimitive")) { 503 this.transientPrimitive = ((Long ) value).longValue(); 504 } 505 } 506 507 private Runnable anonymousSubclass = new Runnable () { 508 private Object o; 509 510 public void run() { 511 System.out.println("syncMap" + syncMap); 512 System.out.println("o: " + o); 513 } 514 }; 515 516 public Object namedSubclass; 517 518 public Runnable getAnonymousSubclass() { 519 return this.anonymousSubclass; 521 } 522 523 public Object getNamedSubclass() { 524 return this.namedSubclass; 526 } 527 528 private Map syncMap; 529 private Collection syncCollection; 530 private List syncList; 531 private Set syncSet; 532 533 private Object transientObject; 534 private long transientPrimitive; 535 536 private Class classObject; 537 private java.sql.Date sqlDate; 538 private final TestObj obj; 539 private File file; 540 private Date dateObject; 541 private String stringValue; 542 private Integer integerObject; 543 private int integerValue; 544 private Boolean booleanObject; 545 private boolean booleanValue; 546 private Long longObject; 547 private long longValue; 548 private Short shortObject; 549 private short shortValue; 550 private Double doubleObject; 551 private double doubleValue; 552 protected Float floatObject; 553 private float floatValue; 554 private Character charObject; 555 private char charValue; 556 private Byte byteObject; 557 private byte byteValue; 558 private TestObj[] objects; 559 private TestObj[][] twoDobjects; 560 private long[] longs; 561 private int[] ints; 562 private int[] ints2; 563 private double[] doubles; 564 private short[] shorts; 565 private boolean[] booleans; 566 private byte[] bytes; 567 private float[] floats; 568 private char[] chars; 569 private Date [] dates; 570 private Character [] charObjects; 571 private Object literalObject; 572 private Object [] objectArray; 573 private BigInteger bigIntegerObject; 574 private BigDecimal bigDecimalObject; 575 576 public TestObj(TestObj obj) { 577 this.obj = obj; 578 } 579 580 public void setSyncMap(Map map) { 581 this.syncMap = map; 582 } 583 584 public void setSyncSet(Set set) { 585 this.syncSet = set; 586 } 587 588 public void setSyncList(List list) { 589 this.syncList = list; 590 } 591 592 public void setSyncCollection(Collection collection) { 593 this.syncCollection = collection; 594 } 595 596 public Map getSyncMap() { 597 return this.syncMap; 598 } 599 600 public Set getSyncSet() { 601 return this.syncSet; 602 } 603 604 public Collection getSyncCollection() { 605 return this.syncCollection; 606 } 607 608 public List getSyncList() { 609 return this.syncList; 610 } 611 612 public void setLiteralObject(Object o) { 613 literalObject = o; 614 } 615 616 public Object getLiteralObject() { 617 return literalObject; 618 } 619 620 623 public boolean getBooleanValue() { 624 return booleanValue; 625 } 626 627 630 public Boolean getBooleanObject() { 631 return booleanObject; 632 } 633 634 public java.sql.Date getSqlDate() { 635 return sqlDate; 636 } 637 638 public void setSqlDate(java.sql.Date sqlDate) { 639 this.sqlDate = sqlDate; 640 } 641 642 645 public void setBooleanObject(Boolean booleanObject) { 646 this.booleanObject = booleanObject; 647 } 648 649 652 public boolean isBooleanValue() { 653 return booleanValue; 654 } 655 656 659 public void setBooleanValue(boolean booleanValue) { 660 this.booleanValue = booleanValue; 661 } 662 663 666 public Byte getByteObject() { 667 return byteObject; 668 } 669 670 673 public void setByteObject(Byte byteObject) { 674 this.byteObject = byteObject; 675 } 676 677 680 public byte getByteValue() { 681 return byteValue; 682 } 683 684 public void setDate(int index, Date value) { 685 dates[index] = value; 686 } 687 688 691 public void setByteValue(byte byteValue) { 692 this.byteValue = byteValue; 693 } 694 695 698 public Character getCharObject() { 699 return charObject; 700 } 701 702 705 public void setCharObject(Character charObject) { 706 this.charObject = charObject; 707 } 708 709 712 public char getCharValue() { 713 return charValue; 714 } 715 716 719 public void setCharValue(char charValue) { 720 this.charValue = charValue; 721 } 722 723 public void setCharacters(Character [] charObjects) { 724 this.charObjects = charObjects; 725 } 726 727 public void setCharacter(int index, Character value) { 728 this.charObjects[index] = value; 729 } 730 731 public Character getCharacter(int index) { 732 return charObjects[index]; 733 } 734 735 738 public Double getDoubleObject() { 739 return doubleObject; 740 } 741 742 745 public void setDoubleObject(Double doubleObject) { 746 this.doubleObject = doubleObject; 747 } 748 749 752 public double getDoubleValue() { 753 return doubleValue; 754 } 755 756 759 public void setDoubleValue(double doubleValue) { 760 this.doubleValue = doubleValue; 761 } 762 763 766 public Float getFloatObject() { 767 return floatObject; 768 } 769 770 773 public void setFloatObject(Float floatObject) { 774 this.floatObject = floatObject; 775 } 776 777 780 public float getFloatValue() { 781 return floatValue; 782 } 783 784 787 public void setFloatValue(float floatValue) { 788 this.floatValue = floatValue; 789 } 790 791 794 public Integer getIntegerObject() { 795 return integerObject; 796 } 797 798 801 public void setIntegerObject(Integer integerObject) { 802 this.integerObject = integerObject; 803 } 804 805 808 public int getIntegerValue() { 809 return integerValue; 810 } 811 812 815 public void setIntegerValue(int integerValue) { 816 this.integerValue = integerValue; 817 } 818 819 822 public Long getLongObject() { 823 return longObject; 824 } 825 826 829 public void setLongObject(Long longObject) { 830 this.longObject = longObject; 831 } 832 833 836 public long getLongValue() { 837 return longValue; 838 } 839 840 843 public void setLongValue(long longValue) { 844 this.longValue = longValue; 845 } 846 847 850 public TestObj getObj() { 851 return obj; 852 } 853 854 857 public Short getShortObject() { 858 return shortObject; 859 } 860 861 864 public void setShortObject(Short shortObject) { 865 this.shortObject = shortObject; 866 } 867 868 871 public short getShortValue() { 872 return shortValue; 873 } 874 875 878 public void setShortValue(short shortValue) { 879 this.shortValue = shortValue; 880 } 881 882 885 public String getStringValue() { 886 return stringValue; 887 } 888 889 892 public void setStringValue(String stringValue) { 893 this.stringValue = stringValue; 894 } 895 896 public TestObj[] getObjects() { 897 return objects; 898 } 899 900 public void setObjects(TestObj[] objects) { 901 this.objects = objects; 902 } 903 904 public void setObject(int index, TestObj value) { 905 objects[index] = value; 906 } 907 908 public TestObj getObject(int index) { 909 return objects[index]; 910 } 911 912 public long getLong(int index) { 913 return longs[index]; 914 } 915 916 public void setLong(int index, long value) { 917 longs[index] = value; 918 } 919 920 public int getInt(int index) { 921 return ints[index]; 922 } 923 924 public void setInt(int index, int value) { 925 ints[index] = value; 926 } 927 928 public void setDates(Date [] dates) { 929 this.dates = dates; 930 } 931 932 public Date getDate(int index) { 933 return dates[index]; 934 } 935 936 public double getDouble(int index) { 937 return doubles[index]; 938 } 939 940 public void setDouble(int index, double value) { 941 doubles[index] = value; 942 } 943 944 public short getShort(int index) { 945 return shorts[index]; 946 } 947 948 public void setShort(int index, short value) { 949 shorts[index] = value; 950 } 951 952 public boolean getBoolean(int index) { 953 return booleans[index]; 954 } 955 956 public void setBoolean(int index, boolean value) { 957 booleans[index] = value; 958 } 959 960 public byte getByte(int index) { 961 return bytes[index]; 962 } 963 964 public void setByte(int index, byte value) { 965 bytes[index] = value; 966 } 967 968 public void setDate(Date date) { 969 this.dateObject = date; 970 } 971 972 public Date getDate() { 973 return dateObject; 974 } 975 976 public float getFloat(int index) { 977 return floats[index]; 978 } 979 980 public void setFloat(int index, float value) { 981 floats[index] = value; 982 } 983 984 public char getChar(int index) { 985 return chars[index]; 986 } 987 988 public void setChar(int index, char value) { 989 chars[index] = value; 990 } 991 992 public boolean[] getBooleans() { 993 return booleans; 994 } 995 996 public void setBooleans(boolean[] booleans) { 997 this.booleans = booleans; 998 } 999 1000 public byte[] getBytes() { 1001 return bytes; 1002 } 1003 1004 public void setBytes(byte[] bytes) { 1005 this.bytes = bytes; 1006 } 1007 1008 public char[] getChars() { 1009 return chars; 1010 } 1011 1012 public void setChars(char[] chars) { 1013 this.chars = chars; 1014 } 1015 1016 public double[] getDoubles() { 1017 return doubles; 1018 } 1019 1020 public void setDoubles(double[] doubles) { 1021 this.doubles = doubles; 1022 } 1023 1024 public float[] getFloats() { 1025 return floats; 1026 } 1027 1028 public void setFloats(float[] floats) { 1029 this.floats = floats; 1030 } 1031 1032 public int[] getInts() { 1033 return ints; 1034 } 1035 1036 public void setInts(int[] ints) { 1037 this.ints = ints; 1038 } 1039 1040 public long[] getLongs() { 1041 return longs; 1042 } 1043 1044 public void setLongs(long[] longs) { 1045 this.longs = longs; 1046 } 1047 1048 public short[] getShorts() { 1049 return shorts; 1050 } 1051 1052 public void setShorts(short[] shorts) { 1053 this.shorts = shorts; 1054 } 1055 1056 public TestObj[][] getTwoDobjects() { 1057 return twoDobjects; 1058 } 1059 1060 public void setTwoDobjects(TestObj[][] twoDobjects) { 1061 this.twoDobjects = twoDobjects; 1062 } 1063 1064 public void setTwoDobject(int i1, int i2, TestObj value) { 1065 this.twoDobjects[i1][i2] = value; 1066 } 1067 1068 public TestObj getTwoDobject(int i1, int i2) { 1069 return twoDobjects[i1][i2]; 1070 } 1071 1072 public File getFile() { 1073 return this.file; 1074 } 1075 1076 public void setFile(File file) { 1077 this.file = file; 1078 } 1079 1080 public Object getObjectArray(int index) { 1081 return objectArray[index]; 1082 } 1083 1084 public Object [] getObjectArray() { 1085 return this.objectArray; 1086 } 1087 1088 public void setObjectArray(int index, Object value) { 1089 objectArray[index] = value; 1090 } 1091 1092 public void setObjectArray(Object [] objectArray) { 1093 this.objectArray = objectArray; 1094 } 1095 1096 public Object getTransientObject() { 1097 return this.transientObject; 1098 } 1099 1100 public void setTransientObject(Object transientObject) { 1101 this.transientObject = transientObject; 1102 } 1103 1104 public long getTransientPrimitive() { 1105 return this.transientPrimitive; 1106 } 1107 1108 public void setTransientPrimitive(long transientPrimitive) { 1109 this.transientPrimitive = transientPrimitive; 1110 } 1111 1112 public Class getClassObject() { 1113 return classObject; 1114 } 1115 1116 public void setClassObject(Class classObject) { 1117 this.classObject = classObject; 1118 } 1119 1120 public BigDecimal getBigDecimalObject() { 1121 return bigDecimalObject; 1122 } 1123 1124 public void setBigDecimalObject(BigDecimal bigDecimalObject) { 1125 this.bigDecimalObject = bigDecimalObject; 1126 } 1127 1128 public BigInteger getBigIntegerObject() { 1129 return bigIntegerObject; 1130 } 1131 1132 public void setBigIntegerObject(BigInteger bigIntegerObject) { 1133 this.bigIntegerObject = bigIntegerObject; 1134 } 1135 1136 } 1137 1138 public synchronized void testAbstractLock() throws Exception { 1139 System.out.println("never called"); 1140 } 1141}
| Popular Tags
|