public final PackageSource getPackageSource(String pkgName) { PackageSource result = findSource(pkgName); if (!isExportedPackage(pkgName)) return result; // if the package is exported then we need to get the local source PackageSource localSource = exportSources.getPackageSource(pkgName); if (result == null) return localSource; if (localSource == null) return result; return createMultiSource(pkgName, new PackageSource[] {result, localSource}); }
public final PackageSource getPackageSource(String pkgName) { PackageSource result = findSource(pkgName); if (!isExportedPackage(pkgName)) return result; // if the package is exported then we need to get the local source PackageSource localSource = exportSources.getPackageSource(pkgName); if (result == null) return localSource; if (localSource == null) return result; return createMultiSource(pkgName, new PackageSource[] {result, localSource}); }
public final PackageSource getPackageSource(String pkgName) { PackageSource result = findSource(pkgName); if (!isExportedPackage(pkgName)) return result; // if the package is exported then we need to get the local source PackageSource localSource = exportSources.getPackageSource(pkgName); if (result == null) return localSource; if (localSource == null) return result; return createMultiSource(pkgName, new PackageSource[] {result, localSource}); }
public final PackageSource getPackageSource(String pkgName) { PackageSource result = findSource(pkgName); if (!isExportedPackage(pkgName)) return result; // if the package is exported then we need to get the local source PackageSource localSource = exportSources.getPackageSource(pkgName); if (result == null) return localSource; if (localSource == null) return result; return createMultiSource(pkgName, new PackageSource[] {result, localSource}); }
public final PackageSource getPackageSource(String pkgName) { PackageSource result = findSource(pkgName); if (!isExportedPackage(pkgName)) return result; // if the package is exported then we need to get the local source PackageSource localSource = exportSources.getPackageSource(pkgName); if (result == null) return localSource; if (localSource == null) return result; return createMultiSource(pkgName, new PackageSource[] {result, localSource}); }
public final PackageSource getPackageSource(String pkgName) { PackageSource result = findSource(pkgName); if (!isExportedPackage(pkgName)) return result; // if the package is exported then we need to get the local source PackageSource localSource = exportSources.getPackageSource(pkgName); if (result == null) return localSource; if (localSource == null) return result; return createMultiSource(pkgName, new PackageSource[] {result, localSource}); }
public final PackageSource getPackageSource(String pkgName) { PackageSource result = findSource(pkgName); if (!isExportedPackage(pkgName)) return result; // if the package is exported then we need to get the local source PackageSource localSource = proxy.getPackageSource(pkgName); if (result == null) return localSource; if (localSource == null) return result; return createMultiSource(pkgName, new PackageSource[] {result, localSource}); }
public final PackageSource getPackageSource(String pkgName) { PackageSource result = findSource(pkgName); if (!isExportedPackage(pkgName)) return result; // if the package is exported then we need to get the local source PackageSource localSource = proxy.getPackageSource(pkgName); if (result == null) return localSource; if (localSource == null) return result; return createMultiSource(pkgName, new PackageSource[] {result, localSource}); }
final void addExportedProvidersFor(String packageName, List<PackageSource> result, Collection<BundleLoader> visited) { if (visited.contains(this)) return; visited.add(this); // See if we locally provide the package. PackageSource local = null; if (isExportedPackage(packageName)) local = exportSources.getPackageSource(packageName); else if (isSubstitutedExport(packageName)) { result.add(findImportedSource(packageName, visited)); return; // should not continue to required bundles in this case } // Must search required bundles that are exported first. for (ModuleWire bundleWire : requiredBundleWires) { if (local != null || BundleNamespace.VISIBILITY_REEXPORT.equals(bundleWire.getRequirement().getDirectives().get(BundleNamespace.REQUIREMENT_VISIBILITY_DIRECTIVE))) { // always add required bundles first if we locally provide the package // This allows a bundle to provide a package from a required bundle without // re-exporting the whole required bundle. BundleLoader loader = getProviderLoader(bundleWire); if (loader != null) { loader.addExportedProvidersFor(packageName, result, visited); } } } // now add the locally provided package. if (local != null) result.add(local); }
final void addExportedProvidersFor(String packageName, List<PackageSource> result, Collection<BundleLoader> visited) { if (visited.contains(this)) return; visited.add(this); // See if we locally provide the package. PackageSource local = null; if (isExportedPackage(packageName)) local = exportSources.getPackageSource(packageName); else if (isSubstitutedExport(packageName)) { result.add(findImportedSource(packageName, visited)); return; // should not continue to required bundles in this case } // Must search required bundles that are exported first. for (ModuleWire bundleWire : requiredBundleWires) { if (local != null || BundleNamespace.VISIBILITY_REEXPORT.equals(bundleWire.getRequirement().getDirectives().get(BundleNamespace.REQUIREMENT_VISIBILITY_DIRECTIVE))) { // always add required bundles first if we locally provide the package // This allows a bundle to provide a package from a required bundle without // re-exporting the whole required bundle. BundleLoader loader = (BundleLoader) bundleWire.getProviderWiring().getModuleLoader(); if (loader != null) { loader.addExportedProvidersFor(packageName, result, visited); } } } // now add the locally provided package. if (local != null) result.add(local); }
final void addExportedProvidersFor(String packageName, List<PackageSource> result, Collection<BundleLoader> visited) { if (visited.contains(this)) return; visited.add(this); // See if we locally provide the package. PackageSource local = null; if (isExportedPackage(packageName)) local = exportSources.getPackageSource(packageName); else if (isSubstitutedExport(packageName)) { result.add(findImportedSource(packageName, visited)); return; // should not continue to required bundles in this case } // Must search required bundles that are exported first. for (ModuleWire bundleWire : requiredBundleWires) { if (local != null || BundleNamespace.VISIBILITY_REEXPORT.equals(bundleWire.getRequirement().getDirectives().get(BundleNamespace.REQUIREMENT_VISIBILITY_DIRECTIVE))) { // always add required bundles first if we locally provide the package // This allows a bundle to provide a package from a required bundle without // re-exporting the whole required bundle. BundleLoader loader = (BundleLoader) bundleWire.getProviderWiring().getModuleLoader(); if (loader != null) { loader.addExportedProvidersFor(packageName, result, visited); } } } // now add the locally provided package. if (local != null) result.add(local); }
final void addExportedProvidersFor(String packageName, List<PackageSource> result, Collection<BundleLoader> visited) { if (visited.contains(this)) return; visited.add(this); // See if we locally provide the package. PackageSource local = null; if (isExportedPackage(packageName)) local = exportSources.getPackageSource(packageName); else if (isSubstitutedExport(packageName)) { result.add(findImportedSource(packageName, visited)); return; // should not continue to required bundles in this case } // Must search required bundles that are exported first. for (ModuleWire bundleWire : requiredBundleWires) { if (local != null || BundleNamespace.VISIBILITY_REEXPORT.equals(bundleWire.getRequirement().getDirectives().get(BundleNamespace.REQUIREMENT_VISIBILITY_DIRECTIVE))) { // always add required bundles first if we locally provide the package // This allows a bundle to provide a package from a required bundle without // re-exporting the whole required bundle. BundleLoader loader = (BundleLoader) bundleWire.getProviderWiring().getModuleLoader(); if (loader != null) { loader.addExportedProvidersFor(packageName, result, visited); } } } // now add the locally provided package. if (local != null) result.add(local); }
final void addExportedProvidersFor(String packageName, List<PackageSource> result, Collection<BundleLoader> visited) { if (visited.contains(this)) return; visited.add(this); // See if we locally provide the package. PackageSource local = null; if (isExportedPackage(packageName)) local = exportSources.getPackageSource(packageName); else if (isSubstitutedExport(packageName)) { result.add(findImportedSource(packageName, visited)); return; // should not continue to required bundles in this case } // Must search required bundles that are exported first. for (ModuleWire bundleWire : requiredBundleWires) { if (local != null || BundleNamespace.VISIBILITY_REEXPORT.equals(bundleWire.getRequirement().getDirectives().get(BundleNamespace.REQUIREMENT_VISIBILITY_DIRECTIVE))) { // always add required bundles first if we locally provide the package // This allows a bundle to provide a package from a required bundle without // re-exporting the whole required bundle. BundleLoader loader = (BundleLoader) bundleWire.getProviderWiring().getModuleLoader(); if (loader != null) { loader.addExportedProvidersFor(packageName, result, visited); } } } // now add the locally provided package. if (local != null) result.add(local); }
final void addExportedProvidersFor(String packageName, List<PackageSource> result, Collection<BundleLoader> visited) { if (visited.contains(this)) return; visited.add(this); // See if we locally provide the package. PackageSource local = null; if (isExportedPackage(packageName)) local = exportSources.getPackageSource(packageName); else if (isSubstitutedExport(packageName)) { result.add(findImportedSource(packageName, visited)); return; // should not continue to required bundles in this case } // Must search required bundles that are exported first. for (ModuleWire bundleWire : requiredBundleWires) { if (local != null || BundleNamespace.VISIBILITY_REEXPORT.equals(bundleWire.getRequirement().getDirectives().get(BundleNamespace.REQUIREMENT_VISIBILITY_DIRECTIVE))) { // always add required bundles first if we locally provide the package // This allows a bundle to provide a package from a required bundle without // re-exporting the whole required bundle. BundleLoader loader = (BundleLoader) bundleWire.getProviderWiring().getModuleLoader(); if (loader != null) { loader.addExportedProvidersFor(packageName, result, visited); } } } // now add the locally provided package. if (local != null) result.add(local); }
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 (!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; }