Bundle[] bundles = bundleContext.getBundles();
for (int i = 0; i < bundles.length; i++) {
Bundle analyzedBundle = bundles[i];
// if the bundle is already included (it's a required one), there's no need to look at it again
if (!importedBundles.containsKey(analyzedBundle)) {
ExportedPackage[] epa = pa.getExportedPackages(analyzedBundle);
if (epa != null)
for (int j = 0; j < epa.length; j++) {
ExportedPackage exportedPackage = epa[j];
Bundle[] importingBundles = exportedPackage.getImportingBundles();