我正在尝试获取每个 bundle 的依赖项。
在此SO post建议我使用FrameworkWiring.getDependencyClosure,
但我无法理解如何初始化类,FrameworkWiring.getDependencyClosure
- 它的接口(interface)。
felix中有这个接口(interface)的实现吗?
第二个问题: 我发现了
BundleWiringImpl getRequirements(null);
但我无法初始化
BundleWiringImpl testObject = new BundleWiringImpl();
NetBeans 显示错误:
constructor BundleWiringImpl in class BundleWiringImpl cannot be applied to given types;
required: Logger,Map,StatefulResolver,BundleRevisionImpl,List<BundleRevision>,List<BundleWire>,Map<String,BundleRevision>,Map<String,List<BundleRevision>>
found: no arguments
reason: actual and formal argument lists differ in length
如何获得部门? :) 可能还有其他方式吗?
最佳答案
叹息。您读过javadoc吗?对于 FrameworkWiring 类型?
框架的框架连接对象可以通过调用系统bundle上的bundle.adapt(FrameworkWiring.class)来获取。只有系统包才能适配 FrameworkWiring 对象。
关于java - Felix 如何使用 FrameworkWiring.getDependencyClosure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12034070/