private Map<String, PackageSource> getImportedSources(Collection<BundleLoader> visited) { synchronized (importedSources) { if (importsInitialized) { return importedSources; } List<ModuleWire> importWires = wiring.getRequiredModuleWires(PackageNamespace.PACKAGE_NAMESPACE); if (importWires != null) { for (ModuleWire importWire : importWires) { PackageSource source = createExportPackageSource(importWire, visited); if (source != null) { importedSources.put(source.getId(), source); } } } importsInitialized = true; return importedSources; } }
private KeyedHashSet getImportedSources(Collection<BundleLoader> visited) { synchronized (importedSources) { if (importsInitialized) { return importedSources; } List<ModuleWire> importWires = wiring.getRequiredModuleWires(PackageNamespace.PACKAGE_NAMESPACE); if (importWires != null) { for (ModuleWire importWire : importWires) { PackageSource source = createExportPackageSource(importWire, visited); if (source != null) { importedSources.add(source); } } } importsInitialized = true; return importedSources; } }
private KeyedHashSet getImportedSources(Collection<BundleLoader> visited) { synchronized (importedSources) { if (importsInitialized) { return importedSources; } List<ModuleWire> importWires = wiring.getRequiredModuleWires(PackageNamespace.PACKAGE_NAMESPACE); if (importWires != null) { for (ModuleWire importWire : importWires) { PackageSource source = createExportPackageSource(importWire, visited); if (source != null) { importedSources.add(source); } } } importsInitialized = true; return importedSources; } }
private KeyedHashSet getImportedSources(Collection<BundleLoader> visited) { synchronized (importedSources) { if (importsInitialized) { return importedSources; } List<ModuleWire> importWires = wiring.getRequiredModuleWires(PackageNamespace.PACKAGE_NAMESPACE); if (importWires != null) { for (ModuleWire importWire : importWires) { PackageSource source = createExportPackageSource(importWire, visited); if (source != null) { importedSources.add(source); } } } importsInitialized = true; return importedSources; } }
private KeyedHashSet getImportedSources(Collection<BundleLoader> visited) { synchronized (importedSources) { if (importsInitialized) { return importedSources; } List<ModuleWire> importWires = wiring.getRequiredModuleWires(PackageNamespace.PACKAGE_NAMESPACE); if (importWires != null) { for (ModuleWire importWire : importWires) { PackageSource source = createExportPackageSource(importWire, visited); if (source != null) { importedSources.add(source); } } } importsInitialized = true; return importedSources; } }
private KeyedHashSet getImportedSources(Collection<BundleLoader> visited) { synchronized (importedSources) { if (importsInitialized) { return importedSources; } List<ModuleWire> importWires = wiring.getRequiredModuleWires(PackageNamespace.PACKAGE_NAMESPACE); if (importWires != null) { for (ModuleWire importWire : importWires) { PackageSource source = createExportPackageSource(importWire, visited); if (source != null) { importedSources.add(source); } } } importsInitialized = true; return importedSources; } }
public synchronized KeyedHashSet getImportedSources(KeyedHashSet visited) { if ((loaderFlags & FLAG_IMPORTSINIT) != 0) return importedSources; BundleDescription bundleDesc = proxy.getBundleDescription(); ExportPackageDescription[] packages = bundleDesc.getResolvedImports(); if (packages != null && packages.length > 0) { if (importedSources == null) importedSources = new KeyedHashSet(packages.length, false); for (int i = 0; i < packages.length; i++) { if (packages[i].getExporter() == bundleDesc) continue; // ignore imports resolved to this bundle PackageSource source = createExportPackageSource(packages[i], visited); if (source != null) importedSources.add(source); } } loaderFlags |= FLAG_IMPORTSINIT; return importedSources; }
public synchronized KeyedHashSet getImportedSources(KeyedHashSet visited) { if ((loaderFlags & FLAG_IMPORTSINIT) != 0) return importedSources; BundleDescription bundleDesc = proxy.getBundleDescription(); ExportPackageDescription[] packages = bundleDesc.getResolvedImports(); if (packages != null && packages.length > 0) { if (importedSources == null) importedSources = new KeyedHashSet(packages.length, false); for (int i = 0; i < packages.length; i++) { if (packages[i].getExporter() == bundleDesc) continue; // ignore imports resolved to this bundle PackageSource source = createExportPackageSource(packages[i], visited); if (source != null) importedSources.add(source); } } loaderFlags |= FLAG_IMPORTSINIT; return importedSources; }
private PackageSource findDynamicSource(String pkgName) { if (!isExportedPackage(pkgName) && isDynamicallyImported(pkgName)) { if (debug.DEBUG_LOADER) { Debug.println("BundleLoader[" + this + "] attempting to resolve dynamic package: " + pkgName); //$NON-NLS-1$ //$NON-NLS-2$ } ModuleRevision revision = wiring.getRevision(); ModuleWire dynamicWire = revision.getRevisions().getModule().getContainer().resolveDynamic(pkgName, revision); if (dynamicWire != null) { PackageSource source = createExportPackageSource(dynamicWire, null); if (debug.DEBUG_LOADER) { Debug.println("BundleLoader[" + this + "] using dynamic import source: " + source); //$NON-NLS-1$ //$NON-NLS-2$ } synchronized (importedSources) { importedSources.put(source.getId(), source); } return source; } } return null; }
private PackageSource findDynamicSource(String pkgName) { if (isDynamicallyImported(pkgName)) { ExportPackageDescription exportPackage = bundle.getFramework().getAdaptor().getState().linkDynamicImport(proxy.getBundleDescription(), pkgName); if (exportPackage != null) { PackageSource source = createExportPackageSource(exportPackage, null); synchronized (this) { if (importedSources == null) importedSources = new KeyedHashSet(false); } synchronized (importedSources) { importedSources.add(source); } return source; } } return null; }
private PackageSource findDynamicSource(String pkgName) { if (isDynamicallyImported(pkgName)) { ExportPackageDescription exportPackage = bundle.getFramework().getAdaptor().getState().linkDynamicImport(proxy.getBundleDescription(), pkgName); if (exportPackage != null) { PackageSource source = createExportPackageSource(exportPackage, null); synchronized (this) { if (importedSources == null) importedSources = new KeyedHashSet(false); } synchronized (importedSources) { importedSources.add(source); } return source; } } return null; }
private PackageSource findDynamicSource(String pkgName) { if (!isExportedPackage(pkgName) && isDynamicallyImported(pkgName)) { if (debug.DEBUG_LOADER) { Debug.println("BundleLoader[" + this + "] attempting to resolve dynamic package: " + pkgName); //$NON-NLS-1$ //$NON-NLS-2$ } ModuleRevision revision = wiring.getRevision(); ModuleWire dynamicWire = revision.getRevisions().getModule().getContainer().resolveDynamic(pkgName, revision); if (dynamicWire != null) { PackageSource source = createExportPackageSource(dynamicWire, null); if (debug.DEBUG_LOADER) { Debug.println("BundleLoader[" + this + "] using dynamic import source: " + source); //$NON-NLS-1$ //$NON-NLS-2$ } synchronized (importedSources) { importedSources.add(source); } return source; } } return null; }
private PackageSource findDynamicSource(String pkgName) { if (!isExportedPackage(pkgName) && isDynamicallyImported(pkgName)) { if (debug.DEBUG_LOADER) { Debug.println("BundleLoader[" + this + "] attempting to resolve dynamic package: " + pkgName); //$NON-NLS-1$ //$NON-NLS-2$ } ModuleRevision revision = wiring.getRevision(); ModuleWire dynamicWire = revision.getRevisions().getModule().getContainer().resolveDynamic(pkgName, revision); if (dynamicWire != null) { PackageSource source = createExportPackageSource(dynamicWire, null); if (debug.DEBUG_LOADER) { Debug.println("BundleLoader[" + this + "] using dynamic import source: " + source); //$NON-NLS-1$ //$NON-NLS-2$ } synchronized (importedSources) { importedSources.add(source); } return source; } } return null; }
private PackageSource findDynamicSource(String pkgName) { if (!isExportedPackage(pkgName) && isDynamicallyImported(pkgName)) { if (debug.DEBUG_LOADER) { Debug.println("BundleLoader[" + this + "] attempting to resolve dynamic package: " + pkgName); //$NON-NLS-1$ //$NON-NLS-2$ } ModuleRevision revision = wiring.getRevision(); ModuleWire dynamicWire = revision.getRevisions().getModule().getContainer().resolveDynamic(pkgName, revision); if (dynamicWire != null) { PackageSource source = createExportPackageSource(dynamicWire, null); if (debug.DEBUG_LOADER) { Debug.println("BundleLoader[" + this + "] using dynamic import source: " + source); //$NON-NLS-1$ //$NON-NLS-2$ } synchronized (importedSources) { importedSources.add(source); } return source; } } return null; }
private PackageSource findDynamicSource(String pkgName) { if (!isExportedPackage(pkgName) && isDynamicallyImported(pkgName)) { if (debug.DEBUG_LOADER) { Debug.println("BundleLoader[" + this + "] attempting to resolve dynamic package: " + pkgName); //$NON-NLS-1$ //$NON-NLS-2$ } ModuleRevision revision = wiring.getRevision(); ModuleWire dynamicWire = revision.getRevisions().getModule().getContainer().resolveDynamic(pkgName, revision); if (dynamicWire != null) { PackageSource source = createExportPackageSource(dynamicWire, null); if (debug.DEBUG_LOADER) { Debug.println("BundleLoader[" + this + "] using dynamic import source: " + source); //$NON-NLS-1$ //$NON-NLS-2$ } synchronized (importedSources) { importedSources.add(source); } return source; } } return null; }
private PackageSource findDynamicSource(String pkgName) { if (!isExportedPackage(pkgName) && isDynamicallyImported(pkgName)) { if (debug.DEBUG_LOADER) { Debug.println("BundleLoader[" + this + "] attempting to resolve dynamic package: " + pkgName); //$NON-NLS-1$ //$NON-NLS-2$ } ModuleRevision revision = wiring.getRevision(); ModuleWire dynamicWire = revision.getRevisions().getModule().getContainer().resolveDynamic(pkgName, revision); if (dynamicWire != null) { PackageSource source = createExportPackageSource(dynamicWire, null); if (debug.DEBUG_LOADER) { Debug.println("BundleLoader[" + this + "] using dynamic import source: " + source); //$NON-NLS-1$ //$NON-NLS-2$ } synchronized (importedSources) { importedSources.add(source); } return source; } } return null; }