Class ConfigurationConverter
java.lang.Object
org.apache.commons.configuration2.ConfigurationConverter
Configuration converter. Helper class to convert between Configuration, ExtendedProperties and standard Properties.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Configuration
getConfiguration
(Properties props) Convert a standard Properties class into a configuration class.getMap
(Configuration config) Convert a Configuration class into a Map class.static Properties
getProperties
(Configuration config) Convert a Configuration class into a Properties class.static Properties
getProperties
(ImmutableConfiguration config) Convert a Configuration class into a Properties class.
-
Method Details
-
getConfiguration
Convert a standard Properties class into a configuration class.- Parameters:
props
- properties object to convert- Returns:
- Configuration configuration created from the Properties
-
getMap
Convert a Configuration class into a Map class.- Parameters:
config
- Configuration object to convert- Returns:
- Map created from the Configuration
-
getProperties
Convert a Configuration class into a Properties class. List properties are joined into a string using either the list delimiter handler of the configuration (if it extends AbstractConfiguration) or with a comma as delimiter otherwise. This version of the method exists only for backwards compatibility reason.- Parameters:
config
- Configuration object to convert- Returns:
- Properties created from the Configuration
-
getProperties
Convert a Configuration class into a Properties class. List properties are joined into a string using either the list delimiter handler of the configuration (if it extends AbstractConfiguration) or with a comma as delimiter otherwise.- Parameters:
config
- ImmutableConfiguration object to convert- Returns:
- Properties created from the Configuration
- Since:
- 2.2
-