Felix how to use FrameworkWiring.getDependencyClosure

谁说我不能喝 提交于 2019-12-13 00:40:53

问题


I am trying to get depends for each bundle. In this SO post I was advised to use FrameworkWiring.getDependencyClosure, but I can't understand how to initialize class, FrameworkWiring.getDependencyClosure - it's interface. Is there any implementations of this interface in felix?

And second question: I have found

BundleWiringImpl getRequirements(null);

but I can't initialize

BundleWiringImpl testObject = new BundleWiringImpl();

NetBeans show error:

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

How to get deps? :) May be any other way?


回答1:


Sigh. Did you read the javadoc for the FrameworkWiring type?

The framework wiring object for the framework can be obtained by calling bundle.adapt(FrameworkWiring.class) on the system bundle. Only the system bundle can be adapted to a FrameworkWiring object.



来源:https://stackoverflow.com/questions/12034070/felix-how-to-use-frameworkwiring-getdependencyclosure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!