}
private void updateInstanceCount(JavaRuntime jr, Map javaClasses) {
Iterator itHeap = jr.getHeaps().iterator();
while (itHeap.hasNext()) {
JavaHeap jh = (JavaHeap)itHeap.next();
Iterator itObject = jh.getObjects().iterator();
while (itObject.hasNext()) {
Object next = itObject.next();
// Check that this is a JavaObject (there may be CorruptData objects in the
// JavaHeap, we don't attempt to count these as instances of known classes).
if (next instanceof JavaObject) {