use of org.apache.xbean.osgi.bundle.util.BundleDescription.RequireBundle in project geronimo-xbean by apache.
the class BundleClassFinder method scanRequireBundles.
private void scanRequireBundles(Collection<String> classes, Bundle bundle) {
BundleDescription description = new BundleDescription(bundle.getHeaders());
List<RequireBundle> requiredBundleList = description.getRequireBundle();
for (RequireBundle requiredBundle : requiredBundleList) {
RequiredBundle[] requiredBundles = packageAdmin.getRequiredBundles(requiredBundle.getName());
Bundle wiredBundle = isWired(bundle, requiredBundles);
if (wiredBundle != null) {
BundleDescription wiredBundleDescription = new BundleDescription(wiredBundle.getHeaders());
List<ExportPackage> exportPackages = wiredBundleDescription.getExportPackage();
Set<String> exportedPackageNames = new HashSet<String>();
for (ExportPackage exportPackage : exportPackages) {
exportedPackageNames.add(exportPackage.getName());
}
Set<String> allClasses = findAllClasses(wiredBundle, discoveryFilter, exportedPackageNames);
classes.addAll(allClasses);
}
}
}
Aggregations