src/jdk.jdi/share/classes/com/sun/tools/jdi/EventSetImpl.java

Print this page




 408         }
 409 
 410         public ReferenceType referenceType() {
 411             return referenceType;
 412         }
 413 
 414         String eventName() {
 415             return "ClassPrepareEvent";
 416         }
 417     }
 418 
 419     class ClassUnloadEventImpl extends EventImpl implements ClassUnloadEvent {
 420         private String classSignature;
 421 
 422         ClassUnloadEventImpl(JDWP.Event.Composite.Events.ClassUnload evt) {
 423             super(evt, evt.requestID);
 424             this.classSignature = evt.signature;
 425         }
 426 
 427         public String className() {
 428             String name = classSignature;
 429             int index = name.indexOf(".");  // check if it's a hidden class
 430             if (index < 0) {
 431                 name = name.replace('/', '.');
 432             } else {
 433                 // the class name of a hidden class is <binary-name> + "/" + <suffix>
 434                 name = name.substring(0, index).replace('/', '.') + "/" +
 435                          name.substring(index + 1, name.length());
 436             }
 437             return name;
 438         }
 439 
 440         public String classSignature() {
 441             return classSignature;
 442         }
 443 
 444         String eventName() {
 445             return "ClassUnloadEvent";
 446         }
 447     }
 448 




 408         }
 409 
 410         public ReferenceType referenceType() {
 411             return referenceType;
 412         }
 413 
 414         String eventName() {
 415             return "ClassPrepareEvent";
 416         }
 417     }
 418 
 419     class ClassUnloadEventImpl extends EventImpl implements ClassUnloadEvent {
 420         private String classSignature;
 421 
 422         ClassUnloadEventImpl(JDWP.Event.Composite.Events.ClassUnload evt) {
 423             super(evt, evt.requestID);
 424             this.classSignature = evt.signature;
 425         }
 426 
 427         public String className() {
 428             String name = classSignature.substring(1, classSignature.length() - 1);
 429             int index = name.indexOf(".");  // check if it's a hidden class
 430             if (index < 0) {
 431                 name = name.replace('/', '.');
 432             } else {
 433                 // the class name of a hidden class is <binary-name> + "/" + <suffix>
 434                 name = name.substring(0, index).replace('/', '.') + "/" +
 435                          name.substring(index + 1, name.length());
 436             }
 437             return name;
 438         }
 439 
 440         public String classSignature() {
 441             return classSignature;
 442         }
 443 
 444         String eventName() {
 445             return "ClassUnloadEvent";
 446         }
 447     }
 448