private static long findBundle(BundleContext context, String namePattern) {
Bundle[] installedBundles = context.getBundles();
for (int i = 0; i < installedBundles.length; i++) {
Bundle bundle = installedBundles[i];
if (bundle.getSymbolicName().matches(namePattern)) {
return bundle.getBundleId();
}
}
throw new RuntimeException("Cannot locate bundle with name pattern " + namePattern);
}
ProductLauncher.java 文件源码
java
阅读 39
收藏 0
点赞 0
评论 0
项目:n4js
作者:
评论列表
文章目录