org.gudy.azureus2.core3.util
Class Debug

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

public class Debug
extends java.lang.Object

Debug-assisting class.


Constructor Summary
Debug()
           
 
Method Summary
static boolean containsException(java.lang.Throwable error, java.lang.Class<? extends java.lang.Throwable> cla)
           
static void dumpSystemProperties()
           
static void dumpThreads(java.lang.String name)
           
static void dumpThreads(java.lang.ThreadGroup threadGroup, java.lang.String indent)
           
static void dumpThreadsLoop(java.lang.String name)
           
static java.lang.String getCompressedStackTrace()
           
static java.lang.String getCompressedStackTrace(int iMaxLines)
           
static java.lang.String getCompressedStackTrace(java.lang.Throwable t, int frames_to_skip, int iMaxLines)
           
static java.lang.String getCompressedStackTrace(java.lang.Throwable t, int frames_to_skip, int iMaxLines, boolean showErrString)
           
static java.lang.String getCompressedStackTraceSkipFrames(int frames_to_skip)
           
static java.lang.String getExceptionMessage(java.lang.Throwable e)
           
static java.lang.String getLastCaller()
           
static java.lang.String getLastCaller(int numToGoBackFurther)
           
static java.lang.String getLastCallerShort()
           
static java.lang.String getLastCallerShort(int numToGoBackFurther)
           
static java.lang.String getNestedExceptionMessage(java.lang.Throwable e)
           
static java.lang.String getNestedExceptionMessageAndStack(java.lang.Throwable e)
           
static java.lang.String getStackTrace(boolean bCompressed, boolean bIncludeSelf)
           
static java.lang.String getStackTrace(boolean bCompressed, boolean bIncludeSelf, int iNumLinesToSkip, int iMaxLines)
           
static java.lang.String getStackTrace(java.lang.Throwable e)
           
static void killAWTThreads()
           
static void killAWTThreads(java.lang.ThreadGroup threadGroup)
           
static void main(java.lang.String[] args)
           
static void out(java.lang.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(java.lang.String _debug_msg, java.lang.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(java.lang.Throwable _exception)
          Prints out the given exception stacktrace to System.out, prefixed by the calling class name, method and line number.
static void outDiagLoggerOnly(java.lang.String str)
           
static void outNoStack(java.lang.String str)
           
static void outNoStack(java.lang.String str, boolean stderr)
           
static void outStackTrace()
           
static void printStackTrace(java.lang.Throwable e)
           
static void printStackTrace(java.lang.Throwable e, java.lang.Object context)
           
static java.lang.String secretFileName(java.lang.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(java.lang.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(java.lang.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(java.lang.String str)

outNoStack

public static void outNoStack(java.lang.String str,
                              boolean stderr)

outDiagLoggerOnly

public static void outDiagLoggerOnly(java.lang.String str)

out

public static void out(java.lang.String _debug_msg,
                       java.lang.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 java.lang.String getLastCaller()

getLastCaller

public static java.lang.String getLastCaller(int numToGoBackFurther)

getLastCallerShort

public static java.lang.String getLastCallerShort()

getLastCallerShort

public static java.lang.String getLastCallerShort(int numToGoBackFurther)

outStackTrace

public static void outStackTrace()

killAWTThreads

public static void killAWTThreads()

getCompressedStackTrace

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

getCompressedStackTrace

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

getStackTrace

public static java.lang.String getStackTrace(boolean bCompressed,
                                             boolean bIncludeSelf)

getStackTrace

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

killAWTThreads

public static void killAWTThreads(java.lang.ThreadGroup threadGroup)

dumpThreads

public static void dumpThreads(java.lang.String name)

dumpThreads

public static void dumpThreads(java.lang.ThreadGroup threadGroup,
                               java.lang.String indent)

dumpThreadsLoop

public static void dumpThreadsLoop(java.lang.String name)

dumpSystemProperties

public static void dumpSystemProperties()

getNestedExceptionMessage

public static java.lang.String getNestedExceptionMessage(java.lang.Throwable e)

containsException

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

getNestedExceptionMessageAndStack

public static java.lang.String getNestedExceptionMessageAndStack(java.lang.Throwable e)

getCompressedStackTraceSkipFrames

public static java.lang.String getCompressedStackTraceSkipFrames(int frames_to_skip)

getCompressedStackTrace

public static java.lang.String getCompressedStackTrace()

getCompressedStackTrace

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

getExceptionMessage

public static java.lang.String getExceptionMessage(java.lang.Throwable e)

printStackTrace

public static void printStackTrace(java.lang.Throwable e)

printStackTrace

public static void printStackTrace(java.lang.Throwable e,
                                   java.lang.Object context)

getStackTrace

public static java.lang.String getStackTrace(java.lang.Throwable e)

secretFileName

public static java.lang.String secretFileName(java.lang.String key)
Parameters:
key -
Returns:

main

public static void main(java.lang.String[] args)