Source:
public DefaultAppConfig(Builder builder) throws ConfigException { super("APP_CONFIG"); try { this.root = new CascadingCompositeConfig(NAME); if (builder.decoder != null) { setDecoder(builder.decoder); this.root.setDecoder(builder.decoder); } this.setStrInterpolator(builder.interpolator.create(this)); this.root.setStrInterpolator(this.getStrInterpolator()); root.addConfig(runtime = new SimpleDynamicConfig(OVERRIDE_LAYER)); runtime.setProperties(builder.props); root.addConfig(dynamic = new CascadingCompositeConfig(DYNAMIC_LAYER)); root.addConfig(new SystemConfig()); root.addConfig(new EnvironmentConfig()); loader = DefaultConfigLoader.builder() .withConfigReader(builder.loaders) .withDefaultCascadingStrategy(builder.defaultStrategy) .withFailOnFirst(builder.failOnFirst) .withStrInterpolator(getStrInterpolator()) .build(); root.addConfig(loader.newLoader().withName(APPLICATION_LAYER).load(builder.configName)); root.addConfig(library = new CascadingCompositeConfig(LIBRARY_LAYER)); this.dynamicObserver = new PropertyFactoryDynamicConfigListener(new PropertyFactory() { @Override public PropertyContainer getProperty(String propName) { return new DefaultPropertyContainer(propName, DefaultAppConfig.this); } }); library.addListener(dynamicObserver); dynamic.addListener(dynamicObserver); dynamic.addConfigs(builder.overrideConfigs); } catch (ConfigException e) { throw e; } catch (Exception e) { throw new ConfigException("Unknown error", e); } }

Target:
public DefaultAppConfig(Builder builder) throws ConfigException { super(NAME); try { this.root = new CascadingCompositeConfig(ROOT); if (builder.decoder != null) { setDecoder(builder.decoder); this.root.setDecoder(builder.decoder); } this.setStrInterpolator(builder.interpolator.create(this)); this.root.setStrInterpolator(this.getStrInterpolator()); root.addConfig(runtimeLayer = new SimpleDynamicConfig(RUNTIME_LAYER)); runtimeLayer.setProperties(builder.props); CascadingCompositeConfig overrideLayer = null; if (builder.enableOverrideLayer) { root.addConfig(overrideLayer = new CascadingCompositeConfig(OVERRIDE_LAYER)); } if (builder.enableSystemLayer) { root.addConfig(new SystemConfig()); } if (builder.enableEnvironmentLayer) { root.addConfig(new EnvironmentConfig()); } loader = DefaultConfigLoader.builder() .withConfigReader(builder.loaders) .withDefaultCascadingStrategy(builder.defaultStrategy) .withFailOnFirst(builder.failOnFirst) .withStrInterpolator(getStrInterpolator()) .build(); if (builder.applicationLayer != null) { root.addConfig(builder.applicationLayer); } else if (builder.configName != null) { root.addConfig(loader.newLoader().withName(APPLICATION_LAYER).load(builder.configName)); } final CascadingCompositeConfig library = new CascadingCompositeConfig(LIBRARY_LAYER); root.addConfig(library); this.dynamicObserver = new PropertyFactoryDynamicConfigListener(new PropertyFactory() { @Override public PropertyContainer getProperty(String propName) { return new DefaultPropertyContainer(propName, DefaultAppConfig.this); } }); library.addListener(dynamicObserver); if (overrideLayer != null) { overrideLayer.addListener(dynamicObserver); overrideLayer.addConfigs(builder.overrideConfigs); } } catch (ConfigException e) { throw e; } catch (Exception e) { throw new ConfigException("Unknown error", e); } }