org.gridkit.jvmtool.codec.stacktrace.ThreadSnapshotExpander Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sjk-stacktrace Show documentation
Show all versions of sjk-stacktrace Show documentation
Thread dumps: capture and encoding
The newest version!
package org.gridkit.jvmtool.codec.stacktrace;
import org.gridkit.jvmtool.event.Event;
import org.gridkit.jvmtool.event.EventMorpher;
public class ThreadSnapshotExpander implements EventMorpher {
private ThreadSnapshotEventPojo pojo = new ThreadSnapshotEventPojo();
@Override
public Event morph(Event event) {
if (event instanceof ThreadTraceEvent && !(event instanceof ThreadSnapshotEvent)) {
pojo.loadFromRawEvent((ThreadTraceEvent) event);
return pojo;
}
else {
return event;
}
}
}