public StackTraceElement [ ] asStackTrace ( ) { int i = 1 ; StackTraceElement [ ] list = new StackTraceElement [ this . size ( ) ] ; for ( Eventable e : this ) { list [ this . size ( ) - i ] = new StackTraceElement ( e . getEventType ( ) . toString ( ) , e . getIdentification ( ) . toString ( ) , e . getElement ( ) . toString ( ) , i ) ; i ++ ; } return list ; }
Build a stack trace for this path . This can be used in generating more meaningful exceptions while using Crawljax in conjunction with JUnit for example .