Class DebugUtil

java.lang.Object
com.evolveum.midpoint.util.DebugUtil

public class DebugUtil extends Object
Author:
semancik
  • Constructor Details

    • DebugUtil

      public DebugUtil()
  • Method Details

    • 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)
    • dump

      public static String dump(DebugDumpable dumpable)
    • dump

      public static String dump(Object object)
    • debugDump

      public static String debugDump(Collection<?> dumpables)
    • 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(DebugDumpable dd)
    • debugDump

      public static String debugDump(DebugDumpable dd, int indent)
    • 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, DebugDumpable dd, int indent)
    • debugDumpWithLabel

      public static void debugDumpWithLabel(StringBuilder sb, String label, DebugDumpable dd, int indent)
    • debugDumpShortWithLabelLn

      public static void debugDumpShortWithLabelLn(StringBuilder sb, String label, ShortDumpable sd, int indent)
    • debugDumpShortWithLabel

      public static void debugDumpShortWithLabel(StringBuilder sb, String label, ShortDumpable sd, int indent)
    • debugDumpWithLabel

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

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

      public static void debugDumpWithLabelLn(StringBuilder sb, String label, Enum<?> val, int indent)
    • debugDumpWithLabel

      public static void debugDumpWithLabel(StringBuilder sb, String label, Enum<?> 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, Boolean val, int indent)
    • debugDumpWithLabelLn

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

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

      public static void debugDumpWithLabelLn(StringBuilder sb, String label, Number 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 void debugDumpWithLabel(StringBuilder sb, String label, Collection<?> values, int indent)
    • debugDumpWithLabelLn

      public static void debugDumpWithLabelLn(StringBuilder sb, String label, Collection<?> values, 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)
    • debugDumpWithLabelShortDump

      public static void debugDumpWithLabelShortDump(StringBuilder sb, String label, ShortDumpable object, int indent)
    • debugDumpWithLabelShortDumpLn

      public static void debugDumpWithLabelShortDumpLn(StringBuilder sb, String label, ShortDumpable 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)
    • dumpObjectSizeEstimateLn

      public static void dumpObjectSizeEstimateLn(StringBuilder sb, String label, Serializable o, int indent)
    • dumpObjectSizeEstimate

      public static void dumpObjectSizeEstimate(StringBuilder sb, String label, Serializable o, int indent)
    • dumpObjectFieldsSizeEstimate

      public static String dumpObjectFieldsSizeEstimate(Serializable o)
    • debugDumpLazily

      public static Object debugDumpLazily(DebugDumpable dumpable)
    • debugDumpLazily

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

      public static Object toStringLazily(Object object)
    • lazy

      public static Object lazy(Supplier<Object> supplier)
    • 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)
    • shortDump

      public static String shortDump(ShortDumpable sd)
    • shortDump

      public static void shortDump(StringBuilder sb, ShortDumpable sd)
    • shortDump

      public static void shortDump(StringBuilder sb, Collection<? extends ShortDumpable> sds)
    • shortDumpLazily

      public static Object shortDumpLazily(ShortDumpable dumpable)
    • shortenUrl

      public static String shortenUrl(String prefix, String fullUrl)
    • 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)
    • dumpThrowable

      public static void dumpThrowable(StringBuilder sb, String label, Throwable throwable, int indent, boolean printStackTrace)
      Dumps a throwable. This is aligned with the need of operation result dumping, so it may not be universally applicable. But it should be good enough.
    • toStringCollection

      public static void toStringCollection(StringBuilder sb, Collection<?> values, int indent)
    • toStringCollection

      @NotNull public static @NotNull String toStringCollection(Collection<?> values, int indent)
    • toStringCollectionLazy

      @NotNull public static @NotNull Object toStringCollectionLazy(Collection<?> values, int indent)
    • standardDebugDump

      public static String standardDebugDump(Object object, int indent, Object... params)
      Facilitates implementing common-case debugDump() method. Very primitive implementation for now.