/*
(non-Javadoc)

@see com.google.inject.AbstractModule#configure()
331911
@Override
    protected void configure() {
        // ***** Simulator content types *****
        Map<String, String> simulatorContentTypes = new HashMap<String, String>();
        simulatorContentTypes.put("application/json", "json");
        simulatorContentTypes.put("application/xml", "xml");
        simulatorContentTypes.put("application/soap+xml", "xml");
        simulatorContentTypes.put("text/xml", "xml");
        simulatorContentTypes.put("default", "txt");

        bind(new TypeLiteral<Map<String, String>>() {
        }).annotatedWith(Names.named("simulatorContentTypes")).toInstance(simulatorContentTypes);

        // ***** Accepts *****
        Map<String, String> accepts = new HashMap<String, String>();
        accepts.put("application/json", "json");
        accepts.put("default", "txt");

        bind(new TypeLiteral<Map<String, String>>() {
        }).annotatedWith(Names.named("accepts")).toInstance(accepts);
        
        // ***** Response content types *****
        Map<String, String> responseContentTypes = new HashMap<String, String>();
        responseContentTypes.put("json", "application/json");
        responseContentTypes.put("txt", "text/plain");
        responseContentTypes.put("xml", "application/xml");
        responseContentTypes.put("default", "text/plain");

        bind(new TypeLiteral<Map<String, String>>() {
        }).annotatedWith(Names.named("responseContentTypes")).toInstance(responseContentTypes);        
    }
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);
        }
    }
564303
public void configure() {
		ServletContext servletContext = ServletActionContext.getServletContext();

		ServletContextTemplateResolver templateResolver = new ServletContextTemplateResolver(servletContext);
		templateResolver.setTemplateMode(templateMode);
		templateResolver.setCharacterEncoding(characterEncoding);
		templateResolver.setPrefix(prefix);
		templateResolver.setSuffix(suffix);
		templateResolver.setCacheable(cacheable);
		templateResolver.setCacheTTLMs(cacheTtlMillis);

		templateEngine.setTemplateResolver(templateResolver);
		StrutsMessageResolver messageResolver = new StrutsMessageResolver();
		templateEngine.setMessageResolver(new StrutsMessageResolver());
		if (templateEngine instanceof SpringTemplateEngine) {
			((SpringTemplateEngine) templateEngine).setMessageSource(messageResolver.getMessageSource());
		}

		// extension diarects.
		FieldDialect fieldDialect = new FieldDialect(TemplateMode.HTML ,"sth");
		templateEngine.addDialect(fieldDialect);
	}
1256659
public JsonLdModule configure(ConfigParam param, String value) {
        Objects.requireNonNull(param);
        configuration.set(param, value);
        return this;
    }
1064597
public void setConfigurations(java.util.Collection<Configuration> configurations) {
        if (configurations == null) {
            this.configurations = null;
            return;
        }

        this.configurations = new java.util.ArrayList<Configuration>(configurations);
    }
90417
public static synchronized void init(Configuration conf) {
    if (!initDone) {
      DefaultConfiguration.conf = conf;
      DefaultConfiguration.initDone = true;
    }
  }
1004332
private synchronized void configure(Configuration config) throws IOException {
    logger.atFine().log("GHFS.configure");
    logger.atFine().log("GHFS_ID = %s", GHFS_ID);

    overrideConfigFromFile(config);
    copyDeprecatedConfigurationOptions(config);
    // Set this configuration as the default config for this instance.
    setConf(config);

    enableFlatGlob = GCS_FLAT_GLOB_ENABLE.get(config, config::getBoolean);
    enableConcurrentGlob = GCS_CONCURRENT_GLOB_ENABLE.get(config, config::getBoolean);
    checksumType = GCS_FILE_CHECKSUM_TYPE.get(config, config::getEnum);
    defaultBlockSize = BLOCK_SIZE.get(config, config::getLong);
    reportedPermissions = new FsPermission(PERMISSIONS_TO_REPORT.get(config, config::get));

    if (gcsFsSupplier == null) {
      if (GCS_LAZY_INITIALIZATION_ENABLE.get(config, config::getBoolean)) {
        gcsFsSupplier =
            Suppliers.memoize(
                () -> {
                  try {
                    GoogleCloudStorageFileSystem gcsFs = createGcsFs(config);

                    pathCodec = gcsFs.getPathCodec();
                    configureBuckets(gcsFs);
                    configureWorkingDirectory(config);
                    gcsFsInitialized = true;

                    return gcsFs;
                  } catch (IOException e) {
                    throw new RuntimeException("Failed to create GCS FS", e);
                  }
                });
        pathCodec = getPathCodec(config);
      } else {
        setGcsFs(createGcsFs(config));
        configureBuckets(getGcsFs());
        configureWorkingDirectory(config);
      }
    } else {
      configureBuckets(getGcsFs());
      configureWorkingDirectory(config);
    }

    logger.atFine().log("GHFS.configure: done");
  }
1184085
@Override
	public void configure(Configuration parameters) {
		boolean needConfigure = isFieldNullOrEmpty(this.query) || isFieldNullOrEmpty(this.dbURL);
		if (needConfigure) {
			this.driverName = parameters.getString(DRIVER_KEY, null);
			this.username = parameters.getString(USERNAME_KEY, null);
			this.password = parameters.getString(PASSWORD_KEY, null);
			this.query = parameters.getString(QUERY_KEY, null);
			this.dbURL = parameters.getString(URL_KEY, null);
		}

		try {
			prepareQueryExecution();
		} catch (SQLException e) {
			throw new IllegalArgumentException("Configure failed:\t!", e);
		}
	}
316342
protected function configure()
    {
        $this
            ->setName('detect')
            ->setDefinition(
                [
                    new InputArgument('path', InputArgument::OPTIONAL, 'path of the project', null),
                    new InputOption(
                        'config-file',
                        'c',
                        InputOption::VALUE_REQUIRED,
                        'File path of the configuration file'
                    ),
                    new InputOption(
                        'format',
                        'f',
                        InputOption::VALUE_REQUIRED,
                        sprintf('Output format (%s)', implode(', ', $this->formats)),
                        $this->formats[0]
                    ),
                ]
            )
            ->setDescription('Detect coupling rules')
            ->setHelp($this->loadHelpContent());
    }
1115965
@Override
  protected void configure() {
    super.configure();
    bind(Crawler.class).to(DefaultCrawler.class);
    bind(ExecutorService.class).toProvider(ExecutorServiceProvider.class);
    bind(HTMLPageResponseFetcher.class).to(HTTPClientResponseFetcher.class);
    bind(HttpClient.class).toProvider(HttpClientProvider.class);
    bind(PageURLParser.class).to(AhrefPageURLParser.class);

    // For parsing assets
    bind(AssetsParser.class).to(DefaultAssetsParser.class);
    bind(AssetsVerifier.class).to(DefaultAssetsVerifier.class);
    bind(AssetFetcher.class).to(HTTPClientAssetFetcher.class);

  }
539023
@Override
	public void configure(Configuration parameters) {

		// enforce sequential configure() calls
		synchronized (CONFIGURE_MUTEX) {
			if (this.mapreduceOutputFormat instanceof Configurable) {
				((Configurable) this.mapreduceOutputFormat).setConf(this.configuration);
			}
		}
	}
927016
@Override
    public void configure()
    {
        log.debug("Loading Entity Metadata...");
        ApplicationMetadata appMetadata = kunderaMetadata.getApplicationMetadata();

        for (String persistenceUnit : persistenceUnits)
        {
            if (appMetadata.getMetamodelMap().get(persistenceUnit.trim()) != null)
            {
                if (log.isDebugEnabled())
                {
                    log.debug("Metadata already exists for the Persistence Unit " + persistenceUnit + ". Nothing to do");
                }
            }
            else
            {
                loadEntityMetadata(persistenceUnit);
            }
        }
    }
70743
protected function configure(): void
    {
        // eg. IndexConfigure() for indexCommand()
        $method = $this->action . 'Configure';

        if (\method_exists($this, $method)) {
            $this->$method();
        }
    }
42618
@Override
    public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
        req.bindJSON(this, json);
        return true;
    }
687449
@Override
    public void configure(String parameters) {
        if (parameters.isEmpty()) {
            return;
        }
        List<String> values = Op.split(parameters, " ");
        int required = 2;
        if (values.size() < required) {
            throw new RuntimeException(String.format(
                    "[configuration error] term <%s> requires <%d> parameters",
                    this.getClass().getSimpleName(), required));
        }
        Iterator<String> it = values.iterator();
        setCenter(Op.toDouble(it.next()));
        setWidth(Op.toDouble(it.next()));
        if (values.size() > required) {
            setHeight(Op.toDouble(it.next()));
        }
    }
508886
public void configure() {
    LOGGER.info("configure()");
    calculators = new ArrayList<>();

    if (fieldExtractorEnabled) {
      fieldExtractor = new FieldExtractor(schema);
      calculators.add(fieldExtractor);
    }

    if (completenessMeasurementEnabled) {
      completenessCalculator = new CompletenessCalculator(schema);
      completenessCalculator.collectFields(completenessCollectFields);
      completenessCalculator.setExistence(fieldExistenceMeasurementEnabled);
      completenessCalculator.setCardinality(fieldCardinalityMeasurementEnabled);
      calculators.add(completenessCalculator);
    }

    if (tfIdfMeasurementEnabled) {
      tfidfCalculator = new TfIdfCalculator(schema);
      if (solrConfiguration != null) {
        tfidfCalculator.setSolrConfiguration(solrConfiguration);
      } else {
        throw new IllegalArgumentException("If TF-IDF measurement is enabled, Solr configuration should not be null.");
      }
      tfidfCalculator.enableTermCollection(collectTfIdfTerms);
      calculators.add(tfidfCalculator);
    }

    if (problemCatalogMeasurementEnabled) {
      if (schema instanceof EdmSchema) {
        ProblemCatalog problemCatalog = new ProblemCatalog((EdmSchema) schema);
        new LongSubject(problemCatalog);
        new TitleAndDescriptionAreSame(problemCatalog);
        new EmptyStrings(problemCatalog);
        calculators.add(problemCatalog);
      }
    }

    if (languageMeasurementEnabled) {
      languageCalculator = new LanguageCalculator(schema);
      calculators.add(languageCalculator);
    }

    if (multilingualSaturationMeasurementEnabled) {
      multilingualSaturationCalculator =
          new MultilingualitySaturationCalculator(schema);
      if (saturationExtendedResult) {
        multilingualSaturationCalculator
          .setResultType(
              MultilingualitySaturationCalculator.ResultTypes.EXTENDED);
      }
      calculators.add(multilingualSaturationCalculator);
    }

    if (uniquenessMeasurementEnabled) {
      if (solrClient == null && solrConfiguration == null) {
        throw new IllegalArgumentException(
          "If Uniqueness measurement is enabled, Solr configuration should not be null."
        );
      }
      if (solrClient == null) {
        solrClient = new DefaultSolrClient(solrConfiguration);
      }
      calculators.add(new UniquenessCalculator(solrClient, schema));
    }
  }
130846
@Override
    public Configuration<?> configure() throws IOException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "configure");
        }

        Configuration<?> configuration = null;
        Class<? extends ValidationProvider<?>> clazz = this.getDefaultProviderClass();
        if (clazz == null) {
            // get configuration object from default provider.
            configuration = Validation.byDefaultProvider().configure();

        } else {
            @SuppressWarnings("unchecked")
            ProviderSpecificBootstrap<?> providerBootstrap = Validation.byProvider((Class) clazz);
            configuration = providerBootstrap.configure();
        }

        setMessageInterpolator(configuration);
        setTraversableResolver(configuration);
        setConstraintValidatorFactory(configuration);
        setConstraintMappings(configuration);
        setProperties(configuration);

        // Indicate to the provider configuration that xml should be ignored. We do this
        // because we need to find the correct xml's for each module, as the provider doesn't
        // guarantee this in an EE environment.
        configuration.ignoreXmlConfiguration();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "configure", configuration);
        }

        return configuration;
    }