本文整理了Java中org.jboss.modules.Module.getModule()
方法的一些代码示例,展示了Module.getModule()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Module.getModule()
方法的具体详情如下:
包路径:org.jboss.modules.Module
类名称:Module
方法名:getModule
[英]Get the module with the given identifier from the module loader used by this module.
[中]从该模块使用的模块加载器中获取具有给定标识符的模块。
代码示例来源:origin: wildfly/wildfly
@Override
public Module loadModule(ModuleIdentifier identifier) {
try {
return module.getModule(identifier);
} catch (Throwable t) {
throw new IllegalArgumentException(t);
}
}
代码示例来源:origin: org.jboss.eap/wildfly-pojo
@Override
public Module loadModule(ModuleIdentifier identifier) {
try {
return module.getModule(identifier);
} catch (Throwable t) {
throw new IllegalArgumentException(t);
}
}
代码示例来源:origin: org.jboss.as/jboss-as-pojo
@Override
public Module loadModule(ModuleIdentifier identifier) {
try {
return module.getModule(identifier);
} catch (Throwable t) {
throw new IllegalArgumentException(t);
}
}
代码示例来源:origin: org.jboss.modules/jboss-modules
/**
* Get the module with the given identifier from the module loader used by this module.
*
* @param identifier the module identifier
* @return the module
* @throws ModuleLoadException if an error occurs
* @deprecated Use {@link #getModule(String)} instead.
*/
@Deprecated
public Module getModule(final ModuleIdentifier identifier) throws ModuleLoadException {
return getModule(identifier.toString());
}
代码示例来源:origin: wildfly/wildfly-core
static ClassLoader resolveClassLoader(String module) throws ModuleLoadException {
Module current = Module.getCallerModule();
if (module != null && current != null) {
ModuleIdentifier mi = ModuleIdentifier.fromString(module);
current = current.getModule(mi);
}
return current != null ? current.getClassLoader() : ClassLoadingAttributeDefinitions.class.getClassLoader();
}
代码示例来源:origin: wildfly/wildfly-core
private static java.security.Permission createPermission(Permission permission) throws StartException {
Module currentModule = Module.getCallerModule();
if (permission.getModule() != null && currentModule != null) {
ModuleIdentifier mi = ModuleIdentifier.fromString(permission.getModule());
try {
currentModule = currentModule.getModule(mi);
} catch (ModuleLoadException e) {
// If we cannot load it, it can never be checked.
throw ElytronSubsystemMessages.ROOT_LOGGER.invalidPermissionModule(permission.getModule(), e);
}
}
ClassLoader classLoader = currentModule != null ? currentModule.getClassLoader() : PermissionMapperDefinitions.class.getClassLoader();
try {
return PermissionUtil.createPermission(classLoader, permission.getClassName(), permission.getTargetName(), permission.getAction());
} catch (InvalidPermissionClassException e) {
throw ElytronSubsystemMessages.ROOT_LOGGER.invalidPermissionClass(permission.getClassName());
} catch (Throwable e) {
throw ElytronSubsystemMessages.ROOT_LOGGER.exceptionWhileCreatingPermission(permission.getClassName(), e);
}
}
代码示例来源:origin: wildfly/wildfly-core
ModuleIdentifier mi = ModuleIdentifier.create(moduleName);
module = cm.getModule(mi);
} catch (ModuleLoadException e) {
throw ElytronSubsystemMessages.ROOT_LOGGER.unableToLoadModule(moduleName, e);
内容来源于网络,如有侵权,请联系作者删除!