public DeploymentConfiguration createConfiguration(DeployableObject dObj) throws InvalidModuleException {
if (dObj == null) {
throw new NullPointerException("No deployable object supplied to configure");
}
ModuleConfigurer configurer = null;
for (ModuleConfigurer moduleConfigurer : moduleConfigurers) {
if (moduleConfigurer.getModuleType() == dObj.getType()) {
configurer = moduleConfigurer;
break;
}
}
if (configurer == null) {
throw new InvalidModuleException("No configurer for module type: " + dObj.getType() + " registered");
}
return configurer.createConfiguration(dObj);
}