org.gridkit.jvmtool.stacktrace
Class AbstractStackFrameArray

java.lang.Object
  extended by org.gridkit.jvmtool.stacktrace.AbstractStackFrameArray
All Implemented Interfaces:
Iterable<StackFrame>, GenericStackElementList<StackFrame>, StackFrameList
Direct Known Subclasses:
StackFrameArray

public abstract class AbstractStackFrameArray
extends Object
implements StackFrameList


Constructor Summary
AbstractStackFrameArray()
           
 
Method Summary
protected abstract  StackFrame[] array()
           
 int depth()
           
 StackFrameList fragment(int from, int to)
          Similar to List.subList(int, int).
 StackFrame frameAt(int n)
          Stack has classical bottom up indexing.
protected abstract  int from()
           
 boolean isEmpty()
           
 Iterator<StackFrame> iterator()
           
protected abstract  int to()
           
 StackFrame[] toArray()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractStackFrameArray

public AbstractStackFrameArray()
Method Detail

array

protected abstract StackFrame[] array()

from

protected abstract int from()

to

protected abstract int to()

iterator

public Iterator<StackFrame> iterator()
Specified by:
iterator in interface Iterable<StackFrame>

frameAt

public StackFrame frameAt(int n)
Description copied from interface: StackFrameList
Stack has classical bottom up indexing. Frame at index 0 is last call frame (tail), while last frame in list is root one.

Specified by:
frameAt in interface GenericStackElementList<StackFrame>
Specified by:
frameAt in interface StackFrameList

depth

public int depth()
Specified by:
depth in interface GenericStackElementList<StackFrame>
Specified by:
depth in interface StackFrameList

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface GenericStackElementList<StackFrame>
Specified by:
isEmpty in interface StackFrameList

fragment

public StackFrameList fragment(int from,
                               int to)
Description copied from interface: StackFrameList
Similar to List.subList(int, int).

Specified by:
fragment in interface GenericStackElementList<StackFrame>
Specified by:
fragment in interface StackFrameList

toArray

public StackFrame[] toArray()
Specified by:
toArray in interface GenericStackElementList<StackFrame>
Specified by:
toArray in interface StackFrameList

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2019. All Rights Reserved.