org.gudy.azureus2.core3.util
Class Debug

java.lang.Object
  extended by org.gudy.azureus2.core3.util.Debug

public class Debug
extends Object

Debug-assisting class.


Constructor Summary
Debug()
           
 
Method Summary
static boolean containsException(Throwable error, Class<? extends Throwable> cla)
           
static void dumpSystemProperties()
           
static void dumpThreads(String name)
           
static void dumpThreads(ThreadGroup threadGroup, String indent)
           
static void dumpThreadsLoop(String name)
           
static String getCompressedStackTrace()
           
static String getCompressedStackTrace(int iMaxLines)
           
static String getCompressedStackTrace(Throwable t, int frames_to_skip, int iMaxLines)
           
static String getCompressedStackTrace(Throwable t, int frames_to_skip, int iMaxLines, boolean showErrString)
           
static String getCompressedStackTraceSkipFrames(int frames_to_skip)
           
static String getExceptionMessage(Throwable e)
           
static String getLastCaller()
           
static String getLastCaller(int numToGoBackFurther)
           
static String getLastCallerShort()
           
static String getLastCallerShort(int numToGoBackFurther)
           
static String getNestedExceptionMessage(Throwable e)
           
static String getNestedExceptionMessageAndStack(Throwable e)
           
static String getStackTrace(boolean bCompressed, boolean bIncludeSelf)
           
static String getStackTrace(boolean bCompressed, boolean bIncludeSelf, int iNumLinesToSkip, int iMaxLines)
           
static String getStackTrace(Throwable e)
           
static void killAWTThreads()
           
static void killAWTThreads(ThreadGroup threadGroup)
           
static void main(String[] args)
           
static void out(String _debug_message)
          Prints out the given debug message to System.out, prefixed by the calling class name, method and line number.
static void out(String _debug_msg, Throwable _exception)
          Prints out the given debug message to System.out, prefixed by the calling class name, method and line number, appending the stacktrace of the given exception.
static void out(Throwable _exception)
          Prints out the given exception stacktrace to System.out, prefixed by the calling class name, method and line number.
static void outDiagLoggerOnly(String str)
           
static void outNoStack(String str)
           
static void outNoStack(String str, boolean stderr)
           
static void outStackTrace()
           
static void printStackTrace(Throwable e)
           
static void printStackTrace(Throwable e, Object context)
           
static String secretFileName(String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Debug

public Debug()
Method Detail

out

public static void out(String _debug_message)
Prints out the given debug message to System.out, prefixed by the calling class name, method and line number.


out

public static void out(Throwable _exception)
Prints out the given exception stacktrace to System.out, prefixed by the calling class name, method and line number.


outNoStack

public static void outNoStack(String str)

outNoStack

public static void outNoStack(String str,
                              boolean stderr)

outDiagLoggerOnly

public static void outDiagLoggerOnly(String str)

out

public static void out(String _debug_msg,
                       Throwable _exception)
Prints out the given debug message to System.out, prefixed by the calling class name, method and line number, appending the stacktrace of the given exception.


getLastCaller

public static String getLastCaller()

getLastCaller

public static String getLastCaller(int numToGoBackFurther)

getLastCallerShort

public static String getLastCallerShort()

getLastCallerShort

public static String getLastCallerShort(int numToGoBackFurther)

outStackTrace

public static void outStackTrace()

killAWTThreads

public static void killAWTThreads()

getCompressedStackTrace

public static String getCompressedStackTrace(Throwable t,
                                             int frames_to_skip,
                                             int iMaxLines)

getCompressedStackTrace

public static String getCompressedStackTrace(Throwable t,
                                             int frames_to_skip,
                                             int iMaxLines,
                                             boolean showErrString)

getStackTrace

public static String getStackTrace(boolean bCompressed,
                                   boolean bIncludeSelf)

getStackTrace

public static String getStackTrace(boolean bCompressed,
                                   boolean bIncludeSelf,
                                   int iNumLinesToSkip,
                                   int iMaxLines)

killAWTThreads

public static void killAWTThreads(ThreadGroup threadGroup)

dumpThreads

public static void dumpThreads(String name)

dumpThreads

public static void dumpThreads(ThreadGroup threadGroup,
                               String indent)

dumpThreadsLoop

public static void dumpThreadsLoop(String name)

dumpSystemProperties

public static void dumpSystemProperties()

getNestedExceptionMessage

public static String getNestedExceptionMessage(Throwable e)

containsException

public static boolean containsException(Throwable error,
                                        Class<? extends Throwable> cla)

getNestedExceptionMessageAndStack

public static String getNestedExceptionMessageAndStack(Throwable e)

getCompressedStackTraceSkipFrames

public static String getCompressedStackTraceSkipFrames(int frames_to_skip)

getCompressedStackTrace

public static String getCompressedStackTrace()

getCompressedStackTrace

public static String getCompressedStackTrace(int iMaxLines)
Parameters:
iMaxLines - Max # of stack lines. If < 0, chops off -MaxLines entries from end
Returns:

getExceptionMessage

public static String getExceptionMessage(Throwable e)

printStackTrace

public static void printStackTrace(Throwable e)

printStackTrace

public static void printStackTrace(Throwable e,
                                   Object context)

getStackTrace

public static String getStackTrace(Throwable e)

secretFileName

public static String secretFileName(String key)
Parameters:
key -
Returns:

main

public static void main(String[] args)