/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
- package solidstack.cache;
- /**
- * Wrapper to enable the current stack trace of a thread to be logged.
- *
- * @author René de Bloois
- */
- public class StackTrace extends Throwable
- {
- private static final long serialVersionUID = 1L;
- private Thread thread;
- /**
- * @param thread The thread of which the stack trace needs to be logged.
- */
- public StackTrace( Thread thread )
- {
- super( "" );
- this.thread = thread;
- }
- @Override
- @SuppressWarnings( "all" )
- public Throwable fillInStackTrace()
- {
- return this;
- }
- @Override
- public StackTraceElement[] getStackTrace()
- {
- return this.thread.getStackTrace();
- }
- }