org.apache.commons.configuration.ConfigurationMap Java Examples

The following examples show how to use org.apache.commons.configuration.ConfigurationMap. 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: QAFTestStepArgumentFormatterImpl.java    From qaf with MIT License 5 votes vote down vote up
private Object getPropValue(String pname, Class<?> paramType) {
	Object o = getBundle().subset(pname);
	if (o instanceof HierarchicalConfiguration && ((HierarchicalConfiguration) o).getRoot().getValue() == null
			&& ((HierarchicalConfiguration) o).getRoot().getChildrenCount() > 0) {
		return new ConfigurationMap(getBundle().subset(pname));
	}
	return getObject(pname, paramType);
}
 
Example #2
Source File: Properties.java    From database with GNU General Public License v2.0 2 votes vote down vote up
/** Adds all properties from the given configuration. 
 * 
 * <p>Properties from the new configuration will clear properties from the first one.
 * 
 * @param configuration a configuration.
 * */
@SuppressWarnings("unchecked")
public void addAll( final Configuration configuration ) {
	new ConfigurationMap( this ).putAll( new ConfigurationMap( configuration ) );
}