org.gridkit.jvmtool.stacktrace.StackFrameArray 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
package org.gridkit.jvmtool.stacktrace;
import java.util.Collection;
public class StackFrameArray extends AbstractStackFrameArray {
final StackFrame[] array;
final int from;
final int to;
public StackFrameArray(Collection frames) {
this(frames.toArray(new StackFrame[frames.size()]));
}
public StackFrameArray(StackFrame[] array) {
this(array, 0, array.length);
}
public StackFrameArray(StackFrame[] array, int from, int to) {
this.array = array;
this.from = from;
this.to = to;
}
protected StackFrame[] array() {
return array;
}
protected int from() {
return from;
}
protected int to() {
return to;
}
@Override
public boolean isEmpty() {
return from == to;
}
}