/** * Add a config element as a specific class. Usually this is done to add a * subclass as one of it's parent classes. * * @param config * the {@link ConfigElement} to be added * @param asClass * the {@link Class} under which the {@link ConfigElement} should * be registered */ public void addConfigElement(ConfigElement config, Class<?> asClass) { if (config != null) { ConfigElement current = configSet.get(asClass); if (current == null) { configSet.put(asClass, cloneIfNecessary(config)); } else { current.addConfigElement(config); } } }