org.gridkit.jvmtool.codec.stacktrace.ThreadSnapshotExpander Maven / Gradle / Ivy
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;
}
}
}