Class DebugUtils


  • public class DebugUtils
    extends Object
    • Constructor Detail

      • DebugUtils

        public DebugUtils()
    • 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)