private Optional<Configuration> makeRootServiceConfiguration(final Optional<Configuration> serviceConfiguration) {
    final EvaluatorType evaluatorType = this.evaluatorManager.getEvaluatorDescriptor().getProcess().getType();
    if (EvaluatorType.CLR == evaluatorType) {
      LOG.log(Level.FINE, "Not using the ConfigurationProviders as we are configuring a {0} Evaluator.", evaluatorType);
      return serviceConfiguration;
    }

    if (!serviceConfiguration.isPresent() && this.evaluatorConfigurationProviders.isEmpty()) {
      // No configurations to merge.
      LOG.info("No service configuration given and no ConfigurationProviders set.");
      return Optional.empty();
    } else {
      final ConfigurationBuilder configurationBuilder = getConfigurationBuilder(serviceConfiguration);
      for (final ConfigurationProvider configurationProvider : this.evaluatorConfigurationProviders) {
        configurationBuilder.addConfiguration(configurationProvider.getConfiguration());
      }
      return Optional.of(configurationBuilder.build());
    }
  }
private Optional < Configuration > makeRootServiceConfiguration ( final Optional < Configuration > serviceConfiguration ) { final EvaluatorType evaluatorType = this . evaluatorManager . getEvaluatorDescriptor ( ) . getProcess ( ) . getType ( ) ; if ( EvaluatorType . CLR == evaluatorType ) { LOG . log ( Level . FINE , "Not using the ConfigurationProviders as we are configuring a {0} Evaluator." , evaluatorType ) ; return serviceConfiguration ; } if ( ! serviceConfiguration . isPresent ( ) && this . evaluatorConfigurationProviders . isEmpty ( ) ) { LOG . info ( "No service configuration given and no ConfigurationProviders set." ) ; return Optional . empty ( ) ; } else { final ConfigurationBuilder configurationBuilder = getConfigurationBuilder ( serviceConfiguration ) ; for ( final ConfigurationProvider configurationProvider : this . evaluatorConfigurationProviders ) { configurationBuilder . addConfiguration ( configurationProvider . getConfiguration ( ) ) ; } return Optional . of ( configurationBuilder . build ( ) ) ; } }
Merges the Configurations provided by the evaluatorConfigurationProviders into the given
serviceConfiguration, if any.