All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.gridkit.jvmtool.stacktrace.StackFrameArray Maven / Gradle / Ivy

There is a newer version: 0.23
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy