1 7 34 35 package com.sun.tools.example.debug.bdi; 36 37 import com.sun.jdi.*; 38 import com.sun.jdi.request.*; 39 40 public class ModificationWatchpointSpec extends WatchpointSpec { 41 42 ModificationWatchpointSpec(EventRequestSpecList specs, 43 ReferenceTypeSpec refSpec, String fieldId) { 44 super(specs, refSpec, fieldId); 45 } 46 47 50 void resolve(ReferenceType refType) throws InvalidTypeException, 51 NoSuchFieldException { 52 if (!(refType instanceof ClassType)) { 53 throw new InvalidTypeException(); 54 } 55 Field field = refType.fieldByName(fieldId); 56 if (field == null) { 57 throw new NoSuchFieldException (fieldId); 58 } 59 setRequest(refType.virtualMachine().eventRequestManager() 60 .createModificationWatchpointRequest(field)); 61 } 62 63 public boolean equals(Object obj) { 64 return (obj instanceof ModificationWatchpointSpec) && 65 super.equals(obj); 66 } 67 } 68 69 70 | Popular Tags |