Example #1
0
  private void setupBuilderConfiguration(PropertyLoader propertyLoader) {
    if (configClass.isAnnotationPresent(LoadingOrder.class)) {
      builderConfiguration.setAnnotationOrder(
          configClass.getAnnotation(LoadingOrder.class).value());
    }

    if (configClass.isAnnotationPresent(PropertyNamePrefix.class)) {
      builderConfiguration.setPropertyNamePrefixes(
          configClass.getAnnotation(PropertyNamePrefix.class).value());
    }

    final Properties properties = propertyLoader.load();
    properties.putAll(additionalProperties);
    builderConfiguration.setProperties(properties);

    builderConfiguration.setCommandLine(
        commandLineHelper.getCommandLine(configClass, commandLineArgs));
  }