// bundle JAR file is represented as a revision ordered from
// newest to oldest. We assume that the first revision found to
// be exporting the package is the provider of the package,
// which makes sense since it must have been resolved first.
List<BundleRevision> revisions =
bundle.adapt(BundleRevisions.class).getRevisions();
for (int i = revisions.size() - 1; i >= 0; i--)
{
BundleRevision br = revisions.get(i);
List<BundleCapability> caps = (br.getWiring() == null)
? br.getDeclaredCapabilities(null)