Build a new configuration

@return
507163
JCorsConfig buildConfig() {

		JCorsConfig config = new JCorsConfig();

		if (enableNonCorsRequests != null) {
			config.setEnableNonCorsRequests(enableNonCorsRequests);
		}

		if (resourcesSupportCredentials != null) {
			config.setResourcesSupportCredentials(resourcesSupportCredentials);
		}

		if (preflightResultCacheMaxAge != null) {
			config.setPreflightResultCacheMaxAge(preflightResultCacheMaxAge);
		}

		setAllowedOrigins(config);
		setAllowedHeaders(config);
		setAllowedMethods(config);
		setExposedHeaders(config);

		return config;
	}
626332
public ConfigurationProvider build() {
    LOG.info("Initializing ConfigurationProvider with "
        + configurationSource.getClass().getCanonicalName() + " source, "
        + reloadStrategy.getClass().getCanonicalName() + " reload strategy and "
        + environment.getClass().getCanonicalName() + " environment");

    final CachedConfigurationSource cachedConfigurationSource = new CachedConfigurationSource(configurationSource);
    if (metricRegistry != null) {
      configurationSource = new MeteredConfigurationSource(metricRegistry, prefix, cachedConfigurationSource);
    }
    cachedConfigurationSource.init();

    Reloadable reloadable = () -> cachedConfigurationSource.reload(environment);

    if (metricRegistry != null) {
      reloadable = new MeteredReloadable(metricRegistry, prefix, reloadable);
    }
    reloadable.reload();
    reloadStrategy.register(reloadable);

    SimpleConfigurationProvider configurationProvider = new SimpleConfigurationProvider(cachedConfigurationSource, environment);
    if (metricRegistry != null) {
      return new MeteredConfigurationProvider(metricRegistry, prefix, configurationProvider);
    }

    return configurationProvider;
  }
705096
public T build() {
        C clientObject = client;
        if (clientObject == null) {
            clientObject = createClient();
        }

        return factory.create(clientObject);
    }
811534
public RestRouterConfiguration build() {
        if (this.enabled) {
            try {
                validate();
            } catch (Exception e) {
                throw logger.configurationValidationError(e);
            }
            return new RestRouterConfiguration(ip, port);
        }
        return null;
    }
508114
public FactoryFactory build() {
        return new FactoryFactory(
                getJceProvider(),
                getHttpClient(),
                getKeyCache(),
                getApiBaseURL(),
                getApiIdentifier(),
                getRequestExpireSeconds(),
                offsetTTL,
                currentPublicKeyTTL,
                entityKeyMap
        );

    }
797032
public Configuration createConfiguration()
    {
        if (crackingHardwareCost == null)
        {
            crackingHardwareCost = getDefaultCrackingHardwareCost();
        }
        if (passwordMatchers == null)
        {
            passwordMatchers = getDefaultPasswordMatchers();
        }
        if (guessTypes == null)
        {
            guessTypes = getDefaultGuessTypes(crackingHardwareCost);
        }
        if (dictionaries == null)
        {
            dictionaries = getDefaultDictionaries();
        }
        if (adjacencyGraphs == null)
        {
            adjacencyGraphs = getDefaultAdjacencyGraphs();
        }
        if (leetTable == null)
        {
            leetTable = getDefaultLeetTable();
        }
        if (yearPattern == null)
        {
            yearPattern = getDefaultYearPattern();
        }
        if (minimumEntropy == null)
        {
            minimumEntropy = getDefaultMinimumEntropy();
        }
        if (locale == null)
        {
            locale = Locale.getDefault();
        }
        if (distanceCalc == null)
        {
            distanceCalc = getDefaultDistanceCalc();
        }
        if (combinationAlgorithmTimeout == null)
        {
            combinationAlgorithmTimeout = getDefaultCombinationAlgorithmTimeout();
        }
        return new Configuration(passwordMatchers, guessTypes, dictionaries, adjacencyGraphs, leetTable, yearPattern, minimumEntropy, locale, distanceCalc, combinationAlgorithmTimeout);
    }
650519
protected T build() {
        if (encoder != null) {
            assert decoder != null;
            return buildFromCodec(decoder, encoder);
        }

        Http2Connection connection = this.connection;
        if (connection == null) {
            connection = new DefaultHttp2Connection(isServer(), maxReservedStreams());
        }

        return buildFromConnection(connection);
    }
98499
public static Config newConfig(String confName) {
        Config c = new Config();
        c.parse(confName);
        return c;
    }
911800
@RequestMapping(value = "configurations/create", method = RequestMethod.POST)
    public JIRAConfiguration newConfiguration(@RequestBody JIRAConfiguration configuration) {
        return jiraConfigurationService.newConfiguration(configuration);
    }
288165
public HttpServer build() {
        checkNotNull(baseUri);
        StandaloneWebConverterConfiguration configuration = makeConfiguration();
        // The configuration has to be configured both by a binder to make it injectable
        // and directly in order to trigger life cycle methods on the deployment container.
        ResourceConfig resourceConfig = ResourceConfig
                .forApplication(new WebConverterApplication(configuration))
                .register(configuration);
        if (sslContext == null) {
            return GrizzlyHttpServerFactory.createHttpServer(baseUri, resourceConfig);
        } else {
            return GrizzlyHttpServerFactory.createHttpServer(baseUri, resourceConfig, true, new SSLEngineConfigurator(sslContext));
        }
    }
1305017
private static ConfigurationBuilder getConfigurationBuilder(final Optional<Configuration> configuration) {
    if (configuration.isPresent()) {
      return Tang.Factory.getTang().newConfigurationBuilder(configuration.get());
    } else {
      return Tang.Factory.getTang().newConfigurationBuilder();
    }
  }
761898
public GitConfigurationSource build() {
    return new GitConfigurationSource(repositoryURI, tmpPath, tmpRepoPrefix, branchResolver, pathResolver,
        configFilesProvider, propertiesProviderSelector);
  }
451302
public function build()
    {
        $client         = $this->buildClient();
        $requestHandler = $this->getRequestHandler();
        // Pass through any configuration options set here which need to be made
        // available elsewhere in the ThisData instance.
        $configuration  = [
            self::CONF_EXPECT_JS_COOKIE => $this->expectJsCookie
        ];

        return new ThisData($client, $requestHandler, $configuration);
    }
703101
public ServerBase build()
  {
    EnvLoader.init();
    
    SystemManager systemManager = createSystemManager();
    
    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();
    
    boolean isValid = false;
    try {
      thread.setContextClassLoader(systemManager.getClassLoader());
      
      Vfs.setPwd(getRootDirectory());
      
      if (! isEmbedded()) {
        logCopyright();
      }

      preConfigureInit();
      
      configureRootDirectory();
      
      _serverSelf = initNetwork();
      Objects.requireNonNull(_serverSelf);
      
      addServices(_serverSelf);

      initHttpSystem(systemManager, _serverSelf);
      
      ServerBase server = build(systemManager,
                                _serverSelf);

      init(server);
      
      isValid = true;
      
      systemManager.start();
      
      return server;
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw ConfigException.wrap(e);
    } finally {
      thread.setContextClassLoader(oldLoader);
      
      if (! isValid) {
        systemManager.shutdown(ShutdownModeAmp.IMMEDIATE);
      }
    }
  }
1277626
@Override
  public PooledExecutionServiceConfiguration build() {
    PooledExecutionServiceConfiguration config = new PooledExecutionServiceConfiguration();
    if (defaultPool != null) {
      config.addDefaultPool(defaultPool.alias, defaultPool.minSize, defaultPool.maxSize);
    }
    for (Pool pool : pools) {
      config.addPool(pool.alias, pool.minSize, pool.maxSize);
    }
    return config;
  }
892452
@RequestMapping(value = "configurations/create", method = RequestMethod.POST)
    public SVNConfiguration newConfiguration(@RequestBody SVNConfiguration configuration) {
        return svnConfigurationService.newConfiguration(configuration);
    }
53547
public Configuration getConfiguration() {
		if (configuration == null) {
			try {
				configuration = new PropertiesConfiguration(getClass().getResource("/nextserver.properties"));
			} catch (ConfigurationException e) {
				throw new RuntimeException(e);
			}
		}		
		return configuration;
	}