Allow customizing the configurations that will be loaded.

@param configurations The configurations to include
@return This application
971179
@Override
    public @Nonnull ApplicationContextBuilder include(@Nullable String... configurations) {
        if (configurations != null) {
            this.configurationIncludes.addAll(Arrays.asList(configurations));
        }
        return this;
    }
766876
public void configure(String configuration)
        throws IOException
    {

        URL url=Resource.newResource(configuration).getURL();
        if (_configuration!=null && _configuration.equals(url.toString()))
            return;
        if (_configuration!=null)
            throw new IllegalStateException("Already configured with "+_configuration);
        try
        {
            XmlConfiguration config=new XmlConfiguration(url);
            _configuration=url.toString();
            config.configure(this);
        }
        catch(IOException e)
        {
            throw e;
        }
        catch(Exception e)
        {
            log.warn(LogSupport.EXCEPTION,e);
            throw new IOException("Jetty configuration problem: "+e);
        }
    }
1092930
private final static void loadConfig() {
		try {
			conf = Configurations.loadConfig(configFilePath);
		} catch (ConfigurationException e) {
			terminate();
			throw new InitializationException(INIT_FAILED, e);
		}
	}
958215
public ConfigurationMetadataRepository build() {
        val result = new SimpleConfigurationMetadataRepository();
        for (val repository : this.repositories) {
            result.include(repository);
        }
        return result;
    }
340276
private function createApplicationConfiguration(array $configuration): ApplicationConfiguration
    {
        $resolver = new OptionsResolver();
        $applicationConfiguration = new ApplicationConfiguration();
        $applicationConfiguration->configureOptions($resolver);

        try {
            $applicationConfiguration->setParameters($resolver->resolve($configuration));
        } catch (Exception $exception) {
            throw new Exception(
                'An error has been found when processing the configuration of the admin application',
                0,
                $exception
            );
        }

        return $applicationConfiguration;
    }
698614
public void apply(CitrusAppConfiguration configuration) {
        setPackages(configuration.getPackages());
        setTestClasses(configuration.getTestClasses());
        setIncludes(configuration.getIncludes());
        addDefaultProperties(configuration.getDefaultProperties());
    }
1366767
protected void modifyConfig(Map<? extends IConfigKey, String> modifyConfig) throws IOException {
        if (propertiesFilePath == null) {
            LOGGER.warn("Config " + propertiesAbsoluteClassPath + " is not a file, maybe just a resource in library.");
        }
        if (configs == null) {
            loadConfigs();
        }
        for (IConfigKey key : modifyConfig.keySet()) {
            if (modifyConfig.get(key) != null) {
                configs.setProperty(key.getKeyString(), modifyConfig.get(key));
            }
        }
        PropertiesIO.store(propertiesFilePath, configs);
    }
749519
public static BigtableOptions fromConfiguration(final Configuration configuration)
      throws IOException {

    BigtableOptions.Builder bigtableOptionsBuilder = BigtableOptions.builder();

    bigtableOptionsBuilder.setProjectId(getValue(configuration, PROJECT_ID_KEY, "Project ID"));
    bigtableOptionsBuilder.setInstanceId(getValue(configuration, INSTANCE_ID_KEY, "Instance ID"));
    String appProfileId = configuration.get(APP_PROFILE_ID_KEY, null);
    if (appProfileId != null) {
      bigtableOptionsBuilder.setAppProfileId(appProfileId);
    }

    bigtableOptionsBuilder.setDataHost(
        getHost(configuration, BIGTABLE_HOST_KEY, BIGTABLE_DATA_HOST_DEFAULT, "API Data"));

    bigtableOptionsBuilder.setAdminHost(getHost(
      configuration, BIGTABLE_ADMIN_HOST_KEY, BIGTABLE_ADMIN_HOST_DEFAULT,
      "Admin"));

    int port = configuration.getInt(BIGTABLE_PORT_KEY, BIGTABLE_PORT_DEFAULT);
    bigtableOptionsBuilder.setPort(port);
    bigtableOptionsBuilder.setUsePlaintextNegotiation(
      configuration.getBoolean(BIGTABLE_USE_PLAINTEXT_NEGOTIATION, false));

    setBulkOptions(configuration, bigtableOptionsBuilder);
    setChannelOptions(configuration, bigtableOptionsBuilder);
    setClientCallOptions(configuration, bigtableOptionsBuilder);

    String emulatorHost = configuration.get(BIGTABLE_EMULATOR_HOST_KEY);
    if (emulatorHost != null) {
      bigtableOptionsBuilder.enableEmulator(emulatorHost);
    }
    bigtableOptionsBuilder.setUseBatch(configuration.getBoolean(BIGTABLE_USE_BATCH, false));

    bigtableOptionsBuilder.setUseGCJClient(configuration.getBoolean(BIGTABLE_USE_GCJ_CLIENT,
        false));
    return bigtableOptionsBuilder.build();
  }
817781
public ConfigurationBuilder addClassLoaders(Collection<ClassLoader> classLoaders) {
        return addClassLoaders(classLoaders.toArray(new ClassLoader[classLoaders.size()]));
    }
366369
public static Configuration cloneConfiguration(Configuration configuration) {
		final Configuration clonedConfiguration = new Configuration(configuration);

		if (clonedConfiguration.getBoolean(USE_LOCAL_DEFAULT_TMP_DIRS)){
			clonedConfiguration.removeConfig(CoreOptions.TMP_DIRS);
			clonedConfiguration.removeConfig(USE_LOCAL_DEFAULT_TMP_DIRS);
		}

		return clonedConfiguration;
	}
132600
@Override
    public ResourceConfig getConfiguration() {
        ApplicationHandler handler = getApplicationHandler();
        return handler == null ? null : handler.getConfiguration();
    }
544671
public static LambdaFactory get(LambdaFactoryConfiguration configuration) {
        JavaCompiler compiler = Optional.ofNullable(configuration.getJavaCompiler()).orElseThrow(JavaCompilerNotFoundException::new);
        return new LambdaFactory(
                configuration.getDefaultHelperClassSourceProvider(),
                configuration.getClassFactory(),
                compiler,
                configuration.getImports(),
                configuration.getStaticImports(),
                configuration.getCompilationClassPath(),
                configuration.getParentClassLoader());
    }
1357638
protected Configurations merge(Configurations other) {
		Set<Class<?>> mergedClasses = new LinkedHashSet<>(getClasses());
		mergedClasses.addAll(other.getClasses());
		return merge(mergedClasses);
	}
1198594
public ConfigurationSourcesModuleBuilder addSource(ConfigurationSource configurationSource) {
    if (configurationSource == null) {
      throw new NullPointerException("configurationSource: null");
    }
    configurationSources.add(configurationSource);
    return this;
  }
260830
@RequestMapping(value = "configurations/create", method = RequestMethod.POST)
    public ArtifactoryConfiguration newConfiguration(@RequestBody ArtifactoryConfiguration configuration) {
        return configurationService.newConfiguration(configuration);
    }
956519
@VisibleForTesting
  void addConfiguration(CombinedConfiguration combinedConfiguration,
      final Configuration configuration) {
    if (configuration instanceof AbstractConfiguration) {
      combinedConfiguration.addConfiguration((AbstractConfiguration) configuration);
    } else {
      combinedConfiguration.addConfiguration(setupConfiguration(new AbstractConfiguration() {

        @Override
        public boolean isEmpty() {
          return configuration.isEmpty();
        }

        @Override
        public Object getProperty(String key) {
          return configuration.getProperty(key);
        }

        @Override
        @SuppressWarnings("rawtypes") // No rawtype in class.
        public Iterator getKeys() {
          return configuration.getKeys();
        }

        @Override
        public boolean containsKey(String key) {
          return configuration.containsKey(key);
        }

        @Override
        protected void addPropertyDirect(String key, Object value) {
          configuration.addProperty(key, value);
        }
      }));
    }
  }
789329
public Configuration prefixedWith(String... prefixes) {
        if (prefixes == null || prefixes.length == 0) {
            return this;
        }
        Map<String, String> filteredConfig = implementationConfiguration.entrySet().stream()
                .filter(e -> Arrays.stream(prefixes).anyMatch(p -> e.getKey()
                        .startsWith(p))).collect(toMap(Map.Entry::getKey, Map.Entry::getValue));
        return new Configuration(feedIdStrategy, resultFilter, filteredConfig);
    }