PageRenderTime 168ms CodeModel.GetById 148ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/test/src/solidstack/cache/StackTrace.java

http://solidstack.googlecode.com/
Java | 36 lines | 22 code | 6 blank | 8 comment | 0 complexity | c1b7f6b492da91a6a37f07197324ebd6 MD5 | raw file
Possible License(s): Apache-2.0
 1package solidstack.cache;
 2
 3
 4/**
 5 * Wrapper to enable the current stack trace of a thread to be logged.
 6 *
 7 * @author René de Bloois
 8 */
 9public class StackTrace extends Throwable
10{
11	private static final long serialVersionUID = 1L;
12
13	private Thread thread;
14
15	/**
16	 * @param thread The thread of which the stack trace needs to be logged.
17	 */
18	public StackTrace( Thread thread )
19	{
20		super( "" );
21		this.thread = thread;
22	}
23
24	@Override
25	@SuppressWarnings( "all" )
26	public Throwable fillInStackTrace()
27	{
28		return this;
29	}
30
31	@Override
32	public StackTraceElement[] getStackTrace()
33	{
34		return this.thread.getStackTrace();
35	}
36}