Assert.notNull(type, "type cannot be null");
ModuleLoader moduleLoader = moduleLoaders.get(type.toLowerCase());
if (failIfNotFound) {
if (moduleLoader == null) {
throw new NoServiceException("No " + ModuleLoader.class.getName()
+ " instance available for module definition type " + type);
}
}
return moduleLoader;