Java Code Examples for org.apache.commons.configuration2.ConfigurationUtils#cloneConfiguration()
The following examples show how to use
org.apache.commons.configuration2.ConfigurationUtils#cloneConfiguration() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AConfigBuilder.java From spoofax with Apache License 2.0 | 5 votes |
protected HierarchicalConfiguration<ImmutableNode> cloneConfiguration(IConfig config) { // Clone configuration. final IConfig iconfig = (IConfig) config; final HierarchicalConfiguration<ImmutableNode> apacheConfig = iconfig.getConfig(); final Configuration clonedConfig = ConfigurationUtils.cloneConfiguration(apacheConfig); @SuppressWarnings("unchecked") final HierarchicalConfiguration<ImmutableNode> clonedHierachicalConfig = (HierarchicalConfiguration<ImmutableNode>) clonedConfig; return clonedHierachicalConfig; }
Example 2
Source File: BaseSettings.java From batfish with Apache License 2.0 | 2 votes |
/** * Initialize settings from an existing configuration * * @param config {@link Configuration} containing the desired settings */ public BaseSettings(Configuration config) { _options = new Options(); _config = ConfigurationUtils.cloneConfiguration(config); }