if (!caller.getClassName().contains("hk2")) {
break;
}
}
if (itr.hasNext()) {
Inhabitant reason = itr.next();
StackTraceElement caller = stack[j];
Module m = null;
try {
if (reason.isInstantiated()) {
m = registry.find(loader.loadClass(reason.typeName()));
}
} catch (ClassNotFoundException e) {
m = null;
}
if (m!=null && !m.getModuleDefinition().getName().equals(currentBundleName)) {
w.append("Looks like module " + currentBundleName + " was " + state + " because "+
m.getName() + " was " + state + "\nSince " + m.getName() + " contains ");
} else {
w.append("Requested by ");
}
if (m!=null)
currentBundleName = m.getName();
w.append(reason + " called from " + caller.getClassName()
+ "." + caller.getMethodName() + ":" + caller.getLineNumber()+" metadata \n" + reason.metadata()+"\n");
w.append("\n");
}
}
}
w.append("\n");
w.append("-----------------------------------\n");
w.append("Inhabitants initialization stack\n");
w.append("-----------------------------------\n");
itr = tracing.inOrder();
while (itr.hasNext()) {
Inhabitant i = itr.next();
w.append(prefix +"> requested from "+ i+"\n");
prefix=prefix+"-";
}
w.append("\n");