/** The 'refType' is known to match, return the EventRequest. */ EventRequest resolveEventRequest(ReferenceType refType) throws NoSuchFieldException { Field field = refType.fieldByName(fieldId); EventRequestManager em = refType.virtualMachine().eventRequestManager(); EventRequest wp = em.createAccessWatchpointRequest(field); wp.setSuspendPolicy(suspendPolicy); wp.enable(); return wp; }