class ConfigWithFallback implements ScopedConfig, ConfigMergeable {

    public static ConfigWithFallback newInstance(final Config originalConfig, final String configPath,
            final KnownConfigValue[] fallBackValues) {

        validateArgument(originalConfig, "original Config");
        validateArgument(configPath, "config path");
        validateArgument(fallBackValues, "fall-back values");

        Config baseConfig;
        if (originalConfig.hasPath(configPath)) {
            baseConfig = DefaultScopedConfig.newInstance(originalConfig, configPath);
        } else {
            baseConfig = DefaultScopedConfig.empty(configPath);
        }
        if (0 < fallBackValues.length) {
            baseConfig = baseConfig.withFallback(arrayToConfig(fallBackValues));
        }

        String configPathToUse = configPath;
        if (originalConfig instanceof ScopedConfig) {
            final WithConfigPath scopedConfig = (WithConfigPath) originalConfig;
            configPathToUse = scopedConfig.getConfigPath() + "." + configPath;
        }

        return new ConfigWithFallback(baseConfig, configPathToUse);
    }

    private  ConfigWithFallback(final Config theBaseConfig, final String theConfigPath);

}