问题
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