@Override protected void addPropertyInternal(final String key, final Object obj) { configuration.addProperty(key, obj); }
/** * Add this property to the in-memory Configuration. * * @param key The Key to add the property to. * @param token The Value to add. */ @Override protected void addPropertyDirect(final String key, final Object token) { inMemoryConfiguration.addProperty(key, token); }
@Override public void addPropertyDirect(final String key, final Object value) { parent.addProperty(getParentKey(key), value); }
@Override protected void addPropertyDirect(final String key, final Object value) { if (configuration instanceof AbstractConfiguration) { ((AbstractConfiguration) configuration).addPropertyDirect(key, value); } else { configuration.addProperty(key, value); } }
/** * <p>Append all properties from the source configuration to the target * configuration. Properties in the source configuration are appended to * the properties with the same key in the target configuration.</p> * <p><em>Note:</em> This method is not able to handle some specifics of * configurations derived from {@code AbstractConfiguration} (e.g. * list delimiters). For a full support of all of these features the * {@code copy()} method of {@code AbstractConfiguration} should * be used. In a future release this method might become deprecated.</p> * * @param source the source configuration * @param target the target configuration * @since 2.2 */ public static void append(final ImmutableConfiguration source, final Configuration target) { for (final Iterator<String> keys = source.getKeys(); keys.hasNext();) { final String key = keys.next(); target.addProperty(key, source.getProperty(key)); } }
for (final Object v : collection) getConfiguration().addProperty(name, v); for (int i = 0; i < length; i++) getConfiguration().addProperty(name, Array.get(value, i));
protected void addPathEntry(Class<? extends TOP> type, String paths) { configuration.addProperty(type.getCanonicalName().replaceAll("\\.", "..") + ".paths", paths); }
protected void addArrayEntry(Class<? extends TOP> type, String featureNames) { configuration.addProperty(type.getCanonicalName().replaceAll("\\.", "..") + ".arraymulti", featureNames); }
/** * Add the given Properties to this config object. * * This method is not completely safe... Probably fine to use in tests, but * it's safer for production code to use load(File). Reason: This method * introduces extra processing of property values and corresponding the risk * of inconsistent handling of special characters and escaped characters. * * @param sourceProps */ public void addAll(final Properties sourceProps) { propertiesObject = null; for (final Object keyObj : sourceProps.keySet()) { final String key = (String) keyObj; logger.debug("addAll(): adding: " + key + "=" + obscurePassword(key, sourceProps.getProperty(key))); config.addProperty(key, sourceProps.getProperty(key)); } getProperties(); }