* Factory to create extended thread information.
*/
private static class ExtendedThreadInfoFactory implements ThreadInfoFactory {
public Map<ThreadInformation, StackTraceElement[]> createThreadInfo() {
final ThreadMXBean bean = ManagementFactory.getThreadMXBean();
final ThreadInfo[] array = bean.dumpAllThreads(true, true);
final Map<ThreadInformation, StackTraceElement[]> threads =
new HashMap<ThreadInformation, StackTraceElement[]>(array.length);
for (final ThreadInfo info : array) {
threads.put(new ExtendedThreadInformation(info), info.getStackTrace());