Dashboard Builder Commons 6.1.0.CR1

org.jboss.dashboard.profiler
Class StackTrace

java.lang.Object
  extended by org.jboss.dashboard.profiler.StackTrace
Direct Known Subclasses:
TimeTrace

public class StackTrace
extends Object

A snapshot of a thread execution at a given time.


Field Summary
protected  CodeBlockTrace context
           
protected  long creationTimeMillis
           
protected  StackTraceElement[] stackTrace
           
 
Constructor Summary
StackTrace(StackTraceElement[] stackTrace, CodeBlockTrace context)
           
 
Method Summary
protected  boolean eq(Object a, Object b)
           
 boolean equals(StackTrace other)
           
protected  boolean equals(StackTraceElement e1, StackTraceElement e2)
           
 StackTraceElement first()
           
 StackTraceElement[] from(int begin, int length)
           
 StackTraceElement get(int index)
           
 CodeBlockTrace getContext()
           
 long getCreationTimeMillis()
           
protected  StackTrace intersect(StackTrace other)
          Intersect two stack traces.
 StackTraceElement last()
           
 int length()
           
static String printStackElement(StackTraceElement e, int maxLength)
           
 String printStackTrace()
           
protected  int reverseIndex(int index)
           
 void setContext(CodeBlockTrace context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

creationTimeMillis

protected long creationTimeMillis

stackTrace

protected StackTraceElement[] stackTrace

context

protected CodeBlockTrace context
Constructor Detail

StackTrace

public StackTrace(StackTraceElement[] stackTrace,
                  CodeBlockTrace context)
Method Detail

equals

public boolean equals(StackTrace other)

getContext

public CodeBlockTrace getContext()

setContext

public void setContext(CodeBlockTrace context)

getCreationTimeMillis

public long getCreationTimeMillis()

length

public int length()

get

public StackTraceElement get(int index)

last

public StackTraceElement last()

first

public StackTraceElement first()

from

public StackTraceElement[] from(int begin,
                                int length)

reverseIndex

protected int reverseIndex(int index)

intersect

protected StackTrace intersect(StackTrace other)
Intersect two stack traces.
A B C D E F G H I J K L M N
A B C D E F G H 1 2 3 4 5 6 7 8 9 0

Cut both to the length of the shortest one
A B C D E F G H I J K L M N
A B C D E F G H 1 2 3 4 5 6

If length = 1 return the element as the intersect.
Else check the element in the middle: G

If the middle is not equals then return the intersect of the first half.
Else return the intersect of the whole by comparing all the elements.


equals

protected boolean equals(StackTraceElement e1,
                         StackTraceElement e2)

eq

protected boolean eq(Object a,
                     Object b)

printStackTrace

public String printStackTrace()

printStackElement

public static String printStackElement(StackTraceElement e,
                                       int maxLength)

Dashboard Builder Commons 6.1.0.CR1

Copyright © 2012-2014 JBoss by Red Hat. All Rights Reserved.