Package spock.config

Examples of spock.config.ConfigurationObject


    initializeConfigurations(initialConfigurations);
  }

  private void initializeConfigurations(List<?> initialConfigurations) {
    for (Object configuration : initialConfigurations) {
      ConfigurationObject annotation = configuration.getClass().getAnnotation(ConfigurationObject.class);
      if (annotation == null) {
        throw new InternalSpockError("Not a @ConfigurationObject: %s").withArgs(configuration.getClass());
      }
      configurationsByType.put(configuration.getClass(), configuration);
      configurationsByName.put(annotation.value(), configuration);
    }
  }
View Full Code Here


    }
  }

  public void configureExtension(Object extension) {
    for (Field field : extension.getClass().getDeclaredFields()) {
      ConfigurationObject annotation = field.getType().getAnnotation(ConfigurationObject.class);
      if (annotation != null) {
        injectConfiguration(field, annotation.value(), extension);
      }
    }
  }
View Full Code Here

TOP

Related Classes of spock.config.ConfigurationObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.