de.esprit.common.util

## Class DebugUtil

- java.lang.Object
- - de.esprit.common.util.DebugUtil

- All Implemented Interfaces:
    SysProps

      public final class DebugUtil
      extends java.lang.Object
      implements SysProps

  This class provides useful methods for debugging. All output intentionally goes to System.out. The utility methods here are supposed to be used temporarily for debugging purposes only. Do not use them in production code!
  Author:
    Rainer Buesch

- - ### Field Summary

    - ### Fields inherited from interface de.esprit.common.util.SysProps

      `FILE_SEPARATOR, JAVA_CLASS_PATH, JAVA_ENDORSED_DIRS, JAVA_HOME, JAVA_IO_TMPDIR, JAVA_RUNTIME_NAME, JAVA_RUNTIME_VERSION, JAVA_SPECIFICATION_VERSION, JAVA_VERSION, JAVA_VM_NAME, LINE_SEPARATOR, OS_ARCH, OS_NAME, OS_VERSION, PATH_SEPARATOR, SUN_ARCH_DATA_MODEL, SUN_AWT_EXCEPTION_HANDLER, USER_DIR, USER_HOME, USER_NAME`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `awaitAllEventsDispatched()` Puts a NOP Runnable into the `EventQueue` and awaits until it has been executed.
    `static void` | `dump(java.lang.Object obj)`
    `static void` | `dump(java.lang.Object obj, java.lang.String title)`
    `static void` | `dump(java.lang.String text)`
    `static void` | `dumpArray(java.lang.Object[] array)`
    `static void` | `dumpArray(java.lang.Object[] array, boolean isFullDump)`
    `static void` | `dumpArray(java.lang.Object[] array, java.lang.String title)`
    `static void` | `dumpArray(java.lang.Object[] array, java.lang.String title, boolean isFullDump)`
    `static void` | `dumpFileContent(java.io.File file)`
    `static void` | `dumpList(java.util.Collection list)`
    `static void` | `dumpList(java.util.Collection list, boolean isFullDump)`
    `static void` | `dumpList(java.util.Collection list, java.lang.String title)`
    `static void` | `dumpList(java.util.Collection list, java.lang.String title, boolean isFullDump)`
    `static void` | `dumpList(javax.swing.JList list)`
    `static void` | `dumpList(javax.swing.JList list, boolean isFullDump)`
    `static void` | `dumpList(javax.swing.JList list, java.lang.String title)`
    `static void` | `dumpList(javax.swing.JList list, java.lang.String title, boolean isFullDump)`
    `static void` | `dumpList(javax.swing.ListModel listModel)`
    `static void` | `dumpList(javax.swing.ListModel listModel, boolean isFullDump)`
    `static void` | `dumpList(javax.swing.ListModel listModel, java.lang.String title)`
    `static void` | `dumpList(javax.swing.ListModel listModel, java.lang.String title, boolean isFullDump)`
    `static void` | `dumpMap(java.util.Map map)` Dumps the content of the given Map to the console in a well formatted way.
    `static void` | `dumpMap(java.util.Map map, java.lang.String title)` Dumps the content of the given Map to the console in a well formatted way.
    `static void` | `dumpMemoryUsage()`
    `static void` | `dumpSystemProperties()` Dumps the system properties to the console.
    `static void` | `dumpUIDefaults()` Dumps the UI defaults.
    `static java.lang.StringBuilder` | `fillDump(java.lang.StringBuilder sb, java.util.Collection list, java.lang.String title)`
    `static java.lang.StringBuilder` | `fillDump(java.lang.StringBuilder sb, java.util.Collection list, java.lang.String title, boolean isFullDump)`
    `static void` | `main(java.lang.String[] args)`
    `static void` | `printLogMessagesForAllLogLevels(java.lang.Class caller, LogChannel logCh)`
    `static void` | `snapshot(java.lang.String title)` Creates a stack trace snapshot on the system error-console where this call is issued.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### dumpMemoryUsage

          public static void dumpMemoryUsage()

    - #### awaitAllEventsDispatched

          public static void awaitAllEventsDispatched()

      Puts a NOP Runnable into the `EventQueue` and awaits until it has been executed. Thus we are sure that all queued events have been dispatched.

    - #### dumpMap

          public static void dumpMap(java.util.Map map)

      Dumps the content of the given Map to the console in a well formatted way.

    - #### dumpMap

          public static void dumpMap(java.util.Map map,
                     java.lang.String title)

      Dumps the content of the given Map to the console in a well formatted way.

    - #### dumpList

          public static void dumpList(javax.swing.ListModel listModel)

    - #### dumpList

          public static void dumpList(javax.swing.ListModel listModel,
                      boolean isFullDump)

    - #### dumpList

          public static void dumpList(javax.swing.ListModel listModel,
                      java.lang.String title)

    - #### dumpList

          public static void dumpList(javax.swing.ListModel listModel,
                      java.lang.String title,
                      boolean isFullDump)

    - #### dumpList

          public static void dumpList(javax.swing.JList list)

    - #### dumpList

          public static void dumpList(javax.swing.JList list,
                      boolean isFullDump)

    - #### dumpList

          public static void dumpList(javax.swing.JList list,
                      java.lang.String title)

    - #### dumpList

          public static void dumpList(javax.swing.JList list,
                      java.lang.String title,
                      boolean isFullDump)

    - #### dumpList

          public static void dumpList(java.util.Collection list)

    - #### dumpList

          public static void dumpList(java.util.Collection list,
                      boolean isFullDump)

    - #### dumpList

          public static void dumpList(java.util.Collection list,
                      java.lang.String title)

    - #### dumpList

          public static void dumpList(java.util.Collection list,
                      java.lang.String title,
                      boolean isFullDump)

    - #### dumpArray

          public static void dumpArray(java.lang.Object[] array)

    - #### dumpArray

          public static void dumpArray(java.lang.Object[] array,
                       boolean isFullDump)

    - #### dumpArray

          public static void dumpArray(java.lang.Object[] array,
                       java.lang.String title)

    - #### dumpArray

          public static void dumpArray(java.lang.Object[] array,
                       java.lang.String title,
                       boolean isFullDump)

    - #### fillDump

          public static java.lang.StringBuilder fillDump(java.lang.StringBuilder sb,
                                         java.util.Collection list,
                                         java.lang.String title)

    - #### fillDump

          public static java.lang.StringBuilder fillDump(java.lang.StringBuilder sb,
                                         java.util.Collection list,
                                         java.lang.String title,
                                         boolean isFullDump)

    - #### dump

          public static void dump(java.lang.String text)

    - #### dump

          public static void dump(java.lang.Object obj)

    - #### dump

          public static void dump(java.lang.Object obj,
                  java.lang.String title)

    - #### dumpFileContent

          public static void dumpFileContent(java.io.File file)
                                      throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### snapshot

          public static void snapshot(java.lang.String title)

      Creates a stack trace snapshot on the system error-console where this call is issued. The program is not halted or affected anyhow.
      Parameters:
        `title` - a header text for the snapshot

    - #### dumpSystemProperties

          public static void dumpSystemProperties()

      Dumps the system properties to the console.

    - #### dumpUIDefaults

          public static void dumpUIDefaults()

      Dumps the UI defaults.

    - #### printLogMessagesForAllLogLevels

          public static void printLogMessagesForAllLogLevels(java.lang.Class caller,
                                             LogChannel logCh)

    - #### main

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

Copyright © 2014 EsprIT-Systems. All Rights Reserved.