Map<Thread, java.lang.StackTraceElement[]> traces = Thread.getAllStackTraces();
for (Map.Entry<Thread, java.lang.StackTraceElement[]> entry : traces.entrySet()) {
final Thread t = entry.getKey();
final java.lang.StackTraceElement[] frames = entry.getValue();
ThreadStackTrace tst = new ThreadStackTrace();
tst.threadName = t.getName();
tst.threadStringRepresentation = String.valueOf(t);
tst.isDaemon = t.isDaemon();
tst.stackTrace = new ArrayList<StackTraceElement>();
for (java.lang.StackTraceElement ste : frames) {