/**
* Get the repository index for the specified resource, where 0 indicates an
* existing OSGi bundle in the framework and -1 indicates not found. This
* method is used by
* {@link #insertHostedCapability(List, HostedCapability)}.
*/
private int findResourceRepositoryIndex(Resource resource) {
if (resource instanceof BundleRevision) {
return 0;
}
int index = 1;
Repository repo = this.resourceRepositoryMap.get(resource);
if (repo == null) {
return -1;
}
for (Repository match : this.repositories.values()) {
if (repo == match) {
return index;
}
index++;
}
// Still not found
return -1;
}
PluginResolveContext.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:osc-core
作者:
评论列表
文章目录