try {
Iterator<BreakpointInfo> iterator = this.unresolvedBreakpoints.iterator();
String fullyQualifiedClassName = ref.name();
while (iterator.hasNext()) {
BreakpointInfo bpi = iterator.next();
if (bpi.getClassInfo().getDotName().equals(fullyQualifiedClassName)) {
List<Location> locations;
try {
locations = ref.locationsOfLine(bpi.getLineNumber());
// Set a breakpoint at the first location.
if (locations.size() >= 1) {
EventRequestManager mgr = vm.eventRequestManager();
BreakpointRequest req = mgr.createBreakpointRequest(locations.get(0));
req.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
if (bpi.getCountFilter() != -1) {
req.addCountFilter(bpi.getCountFilter());
}
// TODO: bpi.setThread(...)
bpi.setMethodInfo(this.session.getClassInformationProvider().getMethodInfo(req.location().method()));
req.enable();
this.infoToRequest.put(bpi, req);
// This breakpoint has been satisfied. Remove it from
// the unsatisfied list.
this.resolvedBreakpoints.add(bpi);