1

各バンドルの依存関係を取得しようとしています。このSO 投稿では、 を使用するように勧められましたがFrameworkWiring.getDependencyClosure、クラスを初期化する方法がわかりませんFrameworkWiring.getDependencyClosure。これはインターフェイスです。felix にこのインターフェイスの実装はありますか?

そして2番目の質問:私は見つけました

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

デプスの入手方法は?:) 他の方法はありますか?

4

1 に答える 1

1

はぁ。FrameworkWiring タイプのjavadocを読みましたか?

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.

于 2012-08-20T14:44:43.613 に答える