this.map = map;
}
public void onModule(final ExtensionModule module) {
if (moduleRegistry.hasModule(module.getName())) {
ExtensionModule loadedModule = moduleRegistry.getModule(module.getName());
if (loadedModule.getVersion().equals(module.getVersion())) {
// already registered
return;
} else {
throw new GroovyRuntimeException("Conflicting module versions. Module ["+module.getName()+" is loaded in version "+
loadedModule.getVersion()+" and you are trying to load version "+module.getVersion());
}
}
moduleRegistry.addModule(module);
// register MetaMethods
List<MetaMethod> metaMethods = module.getMetaMethods();