Package ch.autumo.commons.utils.common
Class GeneralUtils
java.lang.Object
ch.autumo.commons.utils.common.GeneralUtils
General Utils.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Properties
copyProperties
(Properties destination, Properties toCopy) Copy props to destination props.static Properties
copyProperties
(Properties destination, Properties toCopy, boolean overwrite) Copy props to destination props.Create map.static String
getHtmlStackTrace
(Throwable throwable) Get an exception stack trace as html.static String
getStackTrace
(Throwable throwable) Get an exception stack trace as text.static void
printProperties
(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
-