Class DebugUtils

java.lang.Object
de.hsh.graja.util.DebugUtils

public class DebugUtils extends Object
  • Constructor Details

    • DebugUtils

      public DebugUtils()
  • Method Details

    • getCurrentStackTrace

      public static String getCurrentStackTrace()
    • getStackTraceOf

      public static String getStackTraceOf(Throwable e)
    • 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)