如何在JPM中获得混凝土模块的服务?
我有一个动态创建的图层,该图层具有大约25个模块。大约7-10个模块可以提供com.foo.bar
服务。我需要获得混凝土模块的服务 - 我有一个对模块
的引用。有人可以说怎么做吗?细节:
public com.foo.Bar getService(Module module) {
//solution one - get all services on this layer, after iterate them and check
//if some service belongs to `module`. But maybe there are better solutions?
?
}
I have a dynamically created layer that has about 25 modules. About 7-10 modules can provide com.foo.Bar
service. I need to get a service of concrete module - I have a reference to Module
. Could anyone say how to do it? Details:
public com.foo.Bar getService(Module module) {
//solution one - get all services on this layer, after iterate them and check
//if some service belongs to `module`. But maybe there are better solutions?
?
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论