When should I use Import-Package and when should I use Require-Bundle?

后端 未结 6 1715
醉话见心
醉话见心 2020-12-02 13:58

OSGi allows for dependencies to be determined via Import-Package, which just wires up a single package (exported from any bundle), and Require-Bundle

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 14:58

    I'm not convinced that using Import-Package is better, because my default expectation when working with a bundle is to work with the associated public API. For that reason, Require-Bundle makes more sense.

提交回复
热议问题