for(int i = 0; i < configList.size(); i++) {
SmooksResourceConfiguration resourceConfig = configList.get(i);
Class javaClass = resourceConfig.toJavaResource();
if(javaClass != null && ApplicationContextInitializer.class.isAssignableFrom(javaClass)) {
ApplicationContextInitializer initializer;
try {
initializer = (ApplicationContextInitializer) javaClass.newInstance();
} catch (Exception e) {
throw new SmooksConfigurationException("Failed to create an instance of the '" + javaClass.getName() + "' ApplicationContextInitializer class.", e);