public class StackTraceSimplifier
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_BLACKLIST_SYSTEM_PROPERTY_NAME
comma-separated prefixes (not regexes)
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.StackTraceElement> |
clean(java.lang.Iterable<java.lang.StackTraceElement> st) |
java.lang.StackTraceElement[] |
clean(java.lang.StackTraceElement[] st) |
<T extends java.lang.Throwable> |
cleaned(T t)
clean(StackTraceElement[]) the given throwable instance, returning the same instance for convenience |
static <T extends java.lang.Throwable> |
cleanedStackTrace(T t)
static convenience for
cleaned(Throwable) |
static java.util.List<java.lang.StackTraceElement> |
cleanStackTrace(java.lang.Iterable<java.lang.StackTraceElement> st)
static convenience for
clean(Iterable) |
static java.lang.StackTraceElement[] |
cleanStackTrace(java.lang.StackTraceElement[] st)
static convenience for
clean(StackTraceElement[]) |
java.lang.StackTraceElement |
firstUseful(java.lang.StackTraceElement[] st) |
static int |
getRecursiveCallCount()
returns the number of times the calling method occurs elsewhere in the stack trace;
0 if no recursion, 1 if it has cycled three times, etc.
|
static boolean |
isStackTraceElementUseful(java.lang.StackTraceElement el)
static convenience for
isUseful(StackTraceElement) |
boolean |
isUseful(java.lang.StackTraceElement el) |
static StackTraceSimplifier |
newInstance() |
static StackTraceSimplifier |
newInstance(java.lang.String... additionalBlacklistPackagePrefixes) |
static StackTraceSimplifier |
newInstanceExcludingOnly(java.lang.String... blacklistPackagePrefixes) |
java.lang.StackTraceElement |
nthUseful(int n,
java.lang.StackTraceElement[] st) |
static java.lang.String |
toString(java.lang.Throwable t) |
public static final java.lang.String DEFAULT_BLACKLIST_SYSTEM_PROPERTY_NAME
public static StackTraceSimplifier newInstance()
public static StackTraceSimplifier newInstance(java.lang.String... additionalBlacklistPackagePrefixes)
public static StackTraceSimplifier newInstanceExcludingOnly(java.lang.String... blacklistPackagePrefixes)
public boolean isUseful(java.lang.StackTraceElement el)
public java.util.List<java.lang.StackTraceElement> clean(java.lang.Iterable<java.lang.StackTraceElement> st)
isUseful(StackTraceElement)
stack trace elementspublic java.lang.StackTraceElement[] clean(java.lang.StackTraceElement[] st)
isUseful(StackTraceElement)
stack trace elementspublic java.lang.StackTraceElement firstUseful(java.lang.StackTraceElement[] st)
isUseful(StackTraceElement)
stack trace elements, or nullpublic java.lang.StackTraceElement nthUseful(int n, java.lang.StackTraceElement[] st)
isUseful(StackTraceElement)
stack trace elements (ie 0 is firstUseful(StackTraceElement[])
), or nullpublic <T extends java.lang.Throwable> T cleaned(T t)
clean(StackTraceElement[])
the given throwable instance, returning the same instance for conveniencepublic static boolean isStackTraceElementUseful(java.lang.StackTraceElement el)
isUseful(StackTraceElement)
public static java.util.List<java.lang.StackTraceElement> cleanStackTrace(java.lang.Iterable<java.lang.StackTraceElement> st)
clean(Iterable)
public static java.lang.StackTraceElement[] cleanStackTrace(java.lang.StackTraceElement[] st)
clean(StackTraceElement[])
public static <T extends java.lang.Throwable> T cleanedStackTrace(T t)
cleaned(Throwable)
public static java.lang.String toString(java.lang.Throwable t)
public static int getRecursiveCallCount()