Package ch.autumo.commons.utils.common
Class GeneralUtils
java.lang.Object
ch.autumo.commons.utils.common.GeneralUtils
General Utils.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PropertiescopyProperties(Properties destination, Properties toCopy) Copy props to destination props.static PropertiescopyProperties(Properties destination, Properties toCopy, boolean overwrite) Copy props to destination props.Create map.static StringgetHtmlStackTrace(Throwable throwable) Get an exception stack trace as html.static StringgetStackTrace(Throwable throwable) Get an exception stack trace as text.static voidprintProperties(Properties props) Print properties.
-
Method Details
-
getStackTrace
Get an exception stack trace as text.- Parameters:
throwable- thropwable/exception- Returns:
- stack trace text
-
getHtmlStackTrace
Get an exception stack trace as html.- Parameters:
throwable- thropwable/exception- Returns:
- stack trace html
-
copyProperties
Copy props to destination props. Existing destination properties are not overwritten !- Parameters:
destination- destination propstoCopy- props to copy into destination- Returns:
- destination props with values of the props copied
-
copyProperties
public static Properties copyProperties(Properties destination, Properties toCopy, boolean overwrite) Copy props to destination props.- Parameters:
destination- destination propstoCopy- props to copy into destinationoverwrite- true, if existing destination properties should be overwritten- Returns:
- destination props with values of the props copied
-
printProperties
Print properties.- Parameters:
props- props
-
createMap
Create map.- Parameters:
keys- keysvalues- values- Returns:
- map
-