Class Threads


  • public final class Threads
    extends Object
    Utility class for working with Threads.
    Author:
    Curtis Rueden, Gabriel Selzer
    • Method Detail

      • stackTrace

        public static String stackTrace​(Throwable t)
        Extracts the given exception's corresponding stack trace to a string.
      • stackTrace

        public static String stackTrace​(Thread thread)
        Provides a stack dump of the given thread.

        The output is similar to a subset of that given when Ctrl+\ (or Ctrl+Pause on Windows) is pressed from the console.

      • dumpAll

        public static String dumpAll()
        Provides a complete dump of all threads.

        The output is similar to a subset of that given when Ctrl+\ (or Ctrl+Pause on Windows) is pressed from the console.