515 argInfo.traceFlags);
516
517 addListener(new TargetAdapter() {
518 public void eventSetComplete(EventSet set) {
519 if (TestScaffold.this.containsOurVMDeathRequest(set)) {
520 traceln("TS: connect: set.resume() called");
521 set.resume();
522
523 // Note that we want to do the above resume before
524 // waking up any sleepers.
525 synchronized(TestScaffold.this) {
526 TestScaffold.this.notifyAll();
527 }
528 }
529 }
530 public void eventReceived(Event event) {
531 if (redefineAtEvents && event instanceof Locatable) {
532 Location loc = ((Locatable)event).location();
533 ReferenceType rt = loc.declaringType();
534 String name = rt.name();
535 if (name.startsWith("java.") &&
536 !name.startsWith("sun.") &&
537 !name.startsWith("com.")) {
538 if (mainStartClass != null) {
539 redefine(mainStartClass);
540 }
541 } else {
542 redefine(rt);
543 }
544 }
545 }
546
547 public void vmStarted(VMStartEvent event) {
548 synchronized(TestScaffold.this) {
549 vmStartThread = event.thread();
550 TestScaffold.this.notifyAll();
551 }
552 }
553 /**
554 * By default, we catch uncaught exceptions and print a msg.
555 * The testcase must override the createDefaultExceptionRequest
556 * method if it doesn't want this behavior.
557 */
|
515 argInfo.traceFlags);
516
517 addListener(new TargetAdapter() {
518 public void eventSetComplete(EventSet set) {
519 if (TestScaffold.this.containsOurVMDeathRequest(set)) {
520 traceln("TS: connect: set.resume() called");
521 set.resume();
522
523 // Note that we want to do the above resume before
524 // waking up any sleepers.
525 synchronized(TestScaffold.this) {
526 TestScaffold.this.notifyAll();
527 }
528 }
529 }
530 public void eventReceived(Event event) {
531 if (redefineAtEvents && event instanceof Locatable) {
532 Location loc = ((Locatable)event).location();
533 ReferenceType rt = loc.declaringType();
534 String name = rt.name();
535 if (name.startsWith("java.")
536 || name.startsWith("sun.")
537 || name.startsWith("com.")
538 || name.startsWith("jdk.")) {
539 if (mainStartClass != null) {
540 redefine(mainStartClass);
541 }
542 } else {
543 redefine(rt);
544 }
545 }
546 }
547
548 public void vmStarted(VMStartEvent event) {
549 synchronized(TestScaffold.this) {
550 vmStartThread = event.thread();
551 TestScaffold.this.notifyAll();
552 }
553 }
554 /**
555 * By default, we catch uncaught exceptions and print a msg.
556 * The testcase must override the createDefaultExceptionRequest
557 * method if it doesn't want this behavior.
558 */
|