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