bb.util
Class ThreadUtil

java.lang.Object
  extended by bb.util.ThreadUtil

public final class ThreadUtil
extends Object

Provides static utility methods for Threads.

This class is multithread safe: it is stateless.

Author:
Brent Boyer

Nested Class Summary
static class ThreadUtil.UnitTest
          See the Overview page of the project's javadocs for a general description of this unit test class.
 
Constructor Summary
private ThreadUtil()
          This private constructor suppresses the default (public) constructor, ensuring non-instantiability.
 
Method Summary
static String getStackTraceString()
          Returns getStackTraceString( Thread.currentThread() ).
static String getStackTraceString(Thread thread)
          Returns a String that represent's thread's stack trace.
static String toString(Thread thread)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadUtil

private ThreadUtil()
This private constructor suppresses the default (public) constructor, ensuring non-instantiability.

Method Detail

getStackTraceString

public static String getStackTraceString()
Returns getStackTraceString( Thread.currentThread() ).


getStackTraceString

public static String getStackTraceString(Thread thread)
                                  throws IllegalArgumentException
Returns a String that represent's thread's stack trace.

Throws:
IllegalArgumentException - if thread == null

toString

public static String toString(Thread thread)