예제 #1
0
 public static List<ExportedPackage> getExportedPackages(Bundle bundle) {
   final List<ExportedPackage> result = new ArrayList<ExportedPackage>();
   final BundleManifest manifest =
       BundleManifestFactory.createBundleManifest(bundle.getHeaders(), new DummyParserLogger());
   for (ExportedPackage exportedPackage : manifest.getExportPackage().getExportedPackages()) {
     result.add(exportedPackage);
   }
   return result;
 }
예제 #2
0
 public static List<ImportedPackage> getImportedPackages(Bundle bundle, Resolution resolution) {
   final List<ImportedPackage> result = new ArrayList<ImportedPackage>();
   final BundleManifest manifest =
       BundleManifestFactory.createBundleManifest(bundle.getHeaders(), new DummyParserLogger());
   for (ImportedPackage importedPackage : manifest.getImportPackage().getImportedPackages()) {
     if (resolution == null || resolution.equals(importedPackage.getResolution())) {
       result.add(importedPackage);
     }
   }
   return result;
 }
예제 #3
0
 public static boolean isWebBundle(Bundle bundle) {
   return isWebBundle(
       BundleManifestFactory.createBundleManifest(bundle.getHeaders(), new DummyParserLogger()));
 }