/* ********************* ModuleRuntime method implementation ********************* */
public final RuntimeModule loadRuntimeModule(ModuleDefinition definition) {
try {
final RuntimeModule runtimeModule = doLoadModule(definition);
Assert.notNull(classLoaderRegistry);
final String moduleName = definition.getName();
//note that GraphClassLoaderFactory will also populate the ClassLoaderRegistry, hence, this check
if (!classLoaderRegistry.hasClassLoaderFor(moduleName)) {
classLoaderRegistry.addClassLoader(moduleName, runtimeModule.getClassLoader());
}
return runtimeModule;
} finally {
afterModuleLoaded(definition);