Package com.evolveum.midpoint.util
Class DebugUtil
- java.lang.Object
-
- com.evolveum.midpoint.util.DebugUtil
-
public class DebugUtil extends Object
- Author:
- semancik
-
-
Constructor Summary
Constructors Constructor Description DebugUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringBuilder
createIndentedStringBuilder(int indent)
static StringBuilder
createTitleStringBuilder(Class<?> titleClass, int indent)
static StringBuilder
createTitleStringBuilder(String label, int indent)
static StringBuilder
createTitleStringBuilderLn(Class<?> titleClass, int indent)
static String
debugDump(DebugDumpable dd)
static String
debugDump(DebugDumpable dd, int indent)
static String
debugDump(Object object, int indent)
static void
debugDump(StringBuilder sb, Collection<?> dumpables, int indent, boolean openCloseSymbols)
static void
debugDump(StringBuilder sb, Collection<?> dumpables, int indent, boolean openCloseSymbols, String dumpSuffix)
static String
debugDump(Collection<?> dumpables)
static String
debugDump(Collection<?> dumpables, int indent)
static String
debugDump(Collection<?> dumpables, int indent, boolean openCloseSymbols)
static String
debugDump(Map<?,?> dumpables, int indent)
static void
debugDumpLabel(StringBuilder sb, String label, int indent)
static void
debugDumpLabelLn(StringBuilder sb, String label, int indent)
static Object
debugDumpLazily(DebugDumpable dumpable)
static Object
debugDumpLazily(DebugDumpable dumpable, int index)
static Object
debugDumpLazily(Collection<?> dumpables)
static Object
debugDumpLazily(Collection<?> dumpables, int indent)
static <K,V>
voiddebugDumpMapMultiLine(StringBuilder sb, Map<K,V> map, int indent)
static <K,V>
voiddebugDumpMapMultiLine(StringBuilder sb, Map<K,V> map, int indent, boolean openCloseSymbols)
static <K,V>
voiddebugDumpMapMultiLine(StringBuilder sb, Map<K,V> map, int indent, boolean openCloseSymbols, String dumpSuffix)
static <K,V>
StringdebugDumpMapMultiLine(Map<K,V> map)
static <K,V>
voiddebugDumpMapSingleLine(StringBuilder sb, Map<K,V> map, int indent)
static void
debugDumpShortWithLabel(StringBuilder sb, String label, ShortDumpable sd, int indent)
static void
debugDumpShortWithLabelLn(StringBuilder sb, String label, ShortDumpable sd, int indent)
static void
debugDumpWithLabel(StringBuilder sb, String label, DebugDumpable dd, int indent)
static void
debugDumpWithLabel(StringBuilder sb, String label, Boolean val, int indent)
static void
debugDumpWithLabel(StringBuilder sb, String label, Class val, int indent)
static void
debugDumpWithLabel(StringBuilder sb, String label, Integer val, int indent)
static void
debugDumpWithLabel(StringBuilder sb, String label, Long val, int indent)
static void
debugDumpWithLabel(StringBuilder sb, String label, String val, int indent)
static void
debugDumpWithLabel(StringBuilder sb, String label, Collection<?> values, int indent)
static <K,V>
voiddebugDumpWithLabel(StringBuilder sb, String label, Map<K,V> map, int indent)
static void
debugDumpWithLabel(StringBuilder sb, String label, QName val, int indent)
static void
debugDumpWithLabelLn(StringBuilder sb, String label, DebugDumpable dd, int indent)
static void
debugDumpWithLabelLn(StringBuilder sb, String label, Boolean val, int indent)
static void
debugDumpWithLabelLn(StringBuilder sb, String label, Class val, int indent)
static void
debugDumpWithLabelLn(StringBuilder sb, String label, Integer val, int indent)
static void
debugDumpWithLabelLn(StringBuilder sb, String label, Long val, int indent)
static void
debugDumpWithLabelLn(StringBuilder sb, String label, String val, int indent)
static void
debugDumpWithLabelLn(StringBuilder sb, String label, Collection<?> values, int indent)
static <K,V>
voiddebugDumpWithLabelLn(StringBuilder sb, String label, Map<K,V> map, int indent)
static void
debugDumpWithLabelLn(StringBuilder sb, String label, QName val, int indent)
static void
debugDumpWithLabelShortDump(StringBuilder sb, String label, ShortDumpable object, int indent)
static void
debugDumpWithLabelShortDumpLn(StringBuilder sb, String label, ShortDumpable object, int indent)
static void
debugDumpWithLabelToString(StringBuilder sb, String label, Object object, int indent)
static void
debugDumpWithLabelToStringLn(StringBuilder sb, String label, Object object, int indent)
static String
debugDumpXsdAnyProperties(Collection<?> xsdAnyCollection, int indent)
static String
dump(DebugDumpable dumpable)
static String
dump(Object object)
static String
dumpObjectFieldsSizeEstimate(Serializable o)
static void
dumpObjectSizeEstimate(StringBuilder sb, String label, Serializable o, int indent)
static void
dumpObjectSizeEstimateLn(StringBuilder sb, String label, Serializable o, int indent)
static int
estimateObjectSize(Serializable o)
static String
excerpt(String input, int maxChars)
static String
fixIndentInMultiline(int indent, String indentString, String s)
static String
formatDate(Long millis)
static String
formatElementName(QName elementName)
static String
getCollectionClosingSymbol(Collection<?> col)
static String
getCollectionOpeningSymbol(Collection<?> col)
static String
getPrettyPrintBeansAs()
static String
getPrettyPrintBeansAs(String defaultLanguage)
static void
indentDebugDump(StringBuilder sb, int indent)
static boolean
isDetailedDebugDump()
static Object
lazy(Supplier<Object> supplier)
static void
setDetailedDebugDump(boolean detailedDebugDump)
static void
setPrettyPrintBeansAs(String language)
static String
shortDump(ShortDumpable sd)
static void
shortDump(StringBuilder sb, ShortDumpable sd)
static void
shortDump(StringBuilder sb, Collection<? extends ShortDumpable> sds)
static void
shortDumpAppendProperty(StringBuilder sb, String propName, Object propValue)
static <T> void
shortDumpCollectionPrettyPrintOptionalBrackets(StringBuilder sb, List<T> values)
static Object
shortDumpLazily(ShortDumpable dumpable)
static void
shortDumpRemoveLastComma(StringBuilder sb)
static String
shortenUrl(String prefix, String fullUrl)
static Object
toStringLazily(Object object)
static <T> String
valueAndClass(T value)
-
-
-
Method Detail
-
isDetailedDebugDump
public static boolean isDetailedDebugDump()
-
setDetailedDebugDump
public static void setDetailedDebugDump(boolean detailedDebugDump)
-
getPrettyPrintBeansAs
public static String getPrettyPrintBeansAs()
-
setPrettyPrintBeansAs
public static void setPrettyPrintBeansAs(String language)
-
dump
public static String dump(DebugDumpable dumpable)
-
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 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)
-
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)
-
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, Integer val, int indent)
-
debugDumpWithLabelLn
public static void debugDumpWithLabelLn(StringBuilder sb, String label, Integer 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 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)
-
debugDumpXsdAnyProperties
public static String debugDumpXsdAnyProperties(Collection<?> xsdAnyCollection, 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> 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)
-
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 index)
-
debugDumpLazily
public static Object debugDumpLazily(Collection<?> dumpables)
-
debugDumpLazily
public static Object debugDumpLazily(Collection<?> 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)
-
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)
-
-