Package de.hsh.graja.util
Class DebugUtils
- java.lang.Object
-
- de.hsh.graja.util.DebugUtils
-
public class DebugUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description DebugUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getCurrentStackTrace()
static String
getStackTraceOf(Throwable e)
static void
trimStackTrace(Throwable t, String stopOnClassname, boolean outwards)
Searches the stacktrace of t until it finds a stack entry of the given stopOnClassname.static boolean
trimStackTraceOnCycle(Throwable t)
-
-
-
Method Detail
-
getCurrentStackTrace
public static String getCurrentStackTrace()
-
trimStackTrace
public static void trimStackTrace(Throwable t, String stopOnClassname, boolean outwards)
Searches the stacktrace of t until it finds a stack entry of the given stopOnClassname. Inner classes belong to that stopOnClassname and also will stop the search.- Parameters:
t
-stopOnClassname
- the last stack entry that will survive.outwards
- If this is true, then the search for the last surviving stack entry begins with the top stack entry i. e. the current method. If outwards is false, then the search begins with outermost stack entry, i. e. the main method of Graja or a run method of a thread.
-
trimStackTraceOnCycle
public static boolean trimStackTraceOnCycle(Throwable t)
-
-