Package de.objektkontor.config
Class ConfigDuplicator
java.lang.Object
de.objektkontor.config.ConfigInspector
de.objektkontor.config.ConfigDuplicator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> CcloneConfig(C source) Creates deep clone of specified source config.static <C> CcompleteConfig(C config, C template) Diplicates specified template and completes result with non default values from specified config Non default values determinated by comparing config values against values from new config instance, created internally by calling default constructor.static voidcopyConfig(Object source, Object target) Deep copy values from source into target config object.static voidcopyConfig(Object source, Object target, boolean skipDefaults) Deep copy values from source into target config object.Methods inherited from class de.objektkontor.config.ConfigInspector
appendName, dump, dump, dump, getConfigParameterFields, getFieldType, getFieldValue, getIdentifierField, getParameterDescription, getParameterKey, hasObserver, newFieldInstance, newInstanceOfSameType, setFieldValue
-
Constructor Details
-
ConfigDuplicator
public ConfigDuplicator()
-
-
Method Details
-
copyConfig
Deep copy values from source into target config object.- Parameters:
source-target-
-
copyConfig
Deep copy values from source into target config object.- Parameters:
source-target-skipDefaults-
-
cloneConfig
public static <C> C cloneConfig(C source) Creates deep clone of specified source config.- Parameters:
source-- Returns:
-
completeConfig
public static <C> C completeConfig(C config, C template) Diplicates specified template and completes result with non default values from specified config Non default values determinated by comparing config values against values from new config instance, created internally by calling default constructor.- Parameters:
config-template-- Returns:
-