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);
}
}