in atomos/src/main/java/org/apache/felix/atomos/impl/modules/AtomosModules.java [289:323]
protected void filterBasedOnReadEdges(AtomosContent atomosContent,
Collection<BundleCapability> candidates)
{
if (atomosContent == null)
{
// only do this for atomos contents
return;
}
Module m = atomosContent.adapt(Module.class).orElse(null);
if (m == null)
{
filterNotVisible(atomosContent, candidates);
}
else
{
for (Iterator<BundleCapability> iCands = candidates.iterator(); iCands.hasNext();)
{
BundleCapability candidate = iCands.next();
AtomosContent candidateAtomos = getByConnectLocation(
candidate.getRevision().getBundle().getLocation(), true);
if (candidateAtomos == null
|| candidateAtomos.adapt(Module.class).isEmpty())
{
iCands.remove();
}
else
{
if (!m.canRead(candidateAtomos.adapt(Module.class).get()))
{
iCands.remove();
}
}
}
}
}