public final class DebugUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getFieldName(Class<?> c,
int value)
This method uses reflection to scan the values of the given class's static
fields, returning the first matching field's name.
|
static String |
getMainClassName()
Get the class whose main method launched the application.
|
static String |
getStackDump()
Provides a complete stack dump of all threads.
|
static String |
getStackDump(Thread thread)
Provides a stack dump of the given thread.
|
static String |
getStackDump(Thread thread,
StackTraceElement[] stackTrace)
Provides a stack dump of the given thread + call stack.
|
static String |
getStackTrace(Throwable t)
Extracts the given exception's corresponding stack trace to a string.
|
public static String getStackTrace(Throwable t)
public static String getStackDump(Thread thread)
The output is similar to a subset of that given when Ctrl+\ (or Ctrl+Pause on Windows) is pressed from the console.
public static String getStackDump(Thread thread, StackTraceElement[] stackTrace)
The output is similar to a subset of that given when Ctrl+\ (or Ctrl+Pause on Windows) is pressed from the console.
public static String getStackDump()
The output is similar to a subset of that given when Ctrl+\ (or Ctrl+Pause on Windows) is pressed from the console.
public static String getFieldName(Class<?> c, int value)
public static String getMainClassName()
Copyright © 2015–2022 SciJava. All rights reserved.