Search in sources :

Example 1 with BundleDescription

use of org.apache.xbean.osgi.bundle.util.BundleDescription in project geronimo-xbean by apache.

the class BundleAssignableClassFinder method initialize.

private void initialize() {
    BundleDescription description = new BundleDescription(bundle.getHeaders());
    List<BundleDescription.ImportPackage> imports = description.getExternalImports();
    for (BundleDescription.ImportPackage packageImport : imports) {
        String packageName = packageImport.getName();
        ExportedPackage[] exports = packageAdmin.getExportedPackages(packageName);
        Bundle wiredBundle = isWired(bundle, exports);
        if (wiredBundle != null) {
            wiredImportedPackageNames.add(packageName.replace('.', '/'));
            break;
        }
    }
}
Also used : BundleDescription(org.apache.xbean.osgi.bundle.util.BundleDescription) ExportedPackage(org.osgi.service.packageadmin.ExportedPackage) Bundle(org.osgi.framework.Bundle)

Aggregations

BundleDescription (org.apache.xbean.osgi.bundle.util.BundleDescription)1 Bundle (org.osgi.framework.Bundle)1 ExportedPackage (org.osgi.service.packageadmin.ExportedPackage)1