Class DebugUtil


  • public class DebugUtil
    extends Object
    Author:
    semancik
    • Constructor Detail

      • DebugUtil

        public DebugUtil()
    • Method Detail

      • isDetailedDebugDump

        public static boolean isDetailedDebugDump()
      • setDetailedDebugDump

        public static void setDetailedDebugDump​(boolean detailedDebugDump)
      • getPrettyPrintBeansAs

        public static String getPrettyPrintBeansAs()
      • getPrettyPrintBeansAs

        public static String getPrettyPrintBeansAs​(String defaultLanguage)
      • setPrettyPrintBeansAs

        public static void setPrettyPrintBeansAs​(String language)
      • formatElementName

        public static String formatElementName​(QName elementName)
      • debugDump

        public static String debugDump​(Collection<?> dumpables,
                                       int indent)
      • debugDump

        public static String debugDump​(Collection<?> dumpables,
                                       int indent,
                                       boolean openCloseSymbols)
      • debugDump

        public static String debugDump​(Map<?,​?> dumpables,
                                       int indent)
      • debugDump

        public static void debugDump​(StringBuilder sb,
                                     Collection<?> dumpables,
                                     int indent,
                                     boolean openCloseSymbols)
      • debugDump

        public static void debugDump​(StringBuilder sb,
                                     Collection<?> dumpables,
                                     int indent,
                                     boolean openCloseSymbols,
                                     String dumpSuffix)
      • debugDump

        public static String debugDump​(Object object,
                                       int indent)
      • debugDumpLabel

        public static void debugDumpLabel​(StringBuilder sb,
                                          String label,
                                          int indent)
      • debugDumpLabelLn

        public static void debugDumpLabelLn​(StringBuilder sb,
                                            String label,
                                            int indent)
      • debugDumpWithLabelLn

        public static void debugDumpWithLabelLn​(StringBuilder sb,
                                                String label,
                                                String val,
                                                int indent)
      • debugDumpWithLabel

        public static void debugDumpWithLabel​(StringBuilder sb,
                                              String label,
                                              QName val,
                                              int indent)
      • debugDumpWithLabelLn

        public static void debugDumpWithLabelLn​(StringBuilder sb,
                                                String label,
                                                QName val,
                                                int indent)
      • debugDumpWithLabel

        public static void debugDumpWithLabel​(StringBuilder sb,
                                              String label,
                                              Long val,
                                              int indent)
      • debugDumpWithLabelLn

        public static void debugDumpWithLabelLn​(StringBuilder sb,
                                                String label,
                                                Long val,
                                                int indent)
      • debugDumpWithLabel

        public static void debugDumpWithLabel​(StringBuilder sb,
                                              String label,
                                              Class val,
                                              int indent)
      • debugDumpWithLabelLn

        public static void debugDumpWithLabelLn​(StringBuilder sb,
                                                String label,
                                                Class val,
                                                int indent)
      • debugDumpWithLabel

        public static <K,​V> void debugDumpWithLabel​(StringBuilder sb,
                                                          String label,
                                                          Map<K,​V> map,
                                                          int indent)
      • debugDumpWithLabelLn

        public static <K,​V> void debugDumpWithLabelLn​(StringBuilder sb,
                                                            String label,
                                                            Map<K,​V> map,
                                                            int indent)
      • debugDumpWithLabelToString

        public static void debugDumpWithLabelToString​(StringBuilder sb,
                                                      String label,
                                                      Object object,
                                                      int indent)
      • debugDumpWithLabelToStringLn

        public static void debugDumpWithLabelToStringLn​(StringBuilder sb,
                                                        String label,
                                                        Object object,
                                                        int indent)
      • getCollectionOpeningSymbol

        public static String getCollectionOpeningSymbol​(Collection<?> col)
      • getCollectionClosingSymbol

        public static String getCollectionClosingSymbol​(Collection<?> col)
      • indentDebugDump

        public static void indentDebugDump​(StringBuilder sb,
                                           int indent)
      • createIndentedStringBuilder

        public static StringBuilder createIndentedStringBuilder​(int indent)
      • createTitleStringBuilderLn

        public static StringBuilder createTitleStringBuilderLn​(Class<?> titleClass,
                                                               int indent)
      • createTitleStringBuilder

        public static StringBuilder createTitleStringBuilder​(Class<?> titleClass,
                                                             int indent)
      • createTitleStringBuilder

        public static StringBuilder createTitleStringBuilder​(String label,
                                                             int indent)
      • debugDumpMapMultiLine

        public static <K,​V> String debugDumpMapMultiLine​(Map<K,​V> map)
      • debugDumpMapMultiLineLazily

        public static <K,​V> Object debugDumpMapMultiLineLazily​(Map<K,​V> map)
      • debugDumpMapMultiLine

        public static <K,​V> void debugDumpMapMultiLine​(StringBuilder sb,
                                                             Map<K,​V> map,
                                                             int indent)
      • debugDumpMapMultiLine

        public static <K,​V> void debugDumpMapMultiLine​(StringBuilder sb,
                                                             Map<K,​V> map,
                                                             int indent,
                                                             boolean openCloseSymbols)
      • debugDumpMapMultiLine

        public static <K,​V> void debugDumpMapMultiLine​(StringBuilder sb,
                                                             Map<K,​V> map,
                                                             int indent,
                                                             boolean openCloseSymbols,
                                                             String dumpSuffix)
      • debugDumpMapSingleLine

        public static <K,​V> void debugDumpMapSingleLine​(StringBuilder sb,
                                                              Map<K,​V> map,
                                                              int indent)
      • valueAndClass

        public static <T> String valueAndClass​(T value)
      • formatDate

        public static String formatDate​(Long millis)
      • excerpt

        public static String excerpt​(String input,
                                     int maxChars)
      • fixIndentInMultiline

        public static String fixIndentInMultiline​(int indent,
                                                  String indentString,
                                                  String s)
      • estimateObjectSize

        public static int estimateObjectSize​(Serializable o)
      • dumpObjectFieldsSizeEstimate

        public static String dumpObjectFieldsSizeEstimate​(Serializable o)
      • debugDumpLazily

        public static Object debugDumpLazily​(DebugDumpable dumpable,
                                             int indent)
      • toStringLazily

        public static Object toStringLazily​(Object object)
      • debugDumpLazily

        public static Object debugDumpLazily​(Collection<?> dumpables)
      • debugDumpLazily

        public static Object debugDumpLazily​(Collection<?> dumpables,
                                             int indent)
      • debugDumpLazily

        public static Object debugDumpLazily​(Map<?,​?> dumpables,
                                             int indent)
      • shortDumpAppendProperty

        public static void shortDumpAppendProperty​(StringBuilder sb,
                                                   String propName,
                                                   Object propValue)
      • shortDumpRemoveLastComma

        public static void shortDumpRemoveLastComma​(StringBuilder sb)
      • shortDumpCollectionPrettyPrintOptionalBrackets

        public static <T> void shortDumpCollectionPrettyPrintOptionalBrackets​(StringBuilder sb,
                                                                              List<T> values)