Package org.eclipse.osgi.framework.util

Examples of org.eclipse.osgi.framework.util.KeyedHashSet$EquinoxSetIterator


  private Map<String, AbstractBundle[]> bundlesBySymbolicName;

  public BundleRepository(int initialCapacity) {
    synchronized (this) {
      bundlesByInstallOrder = new ArrayList<AbstractBundle>(initialCapacity);
      bundlesById = new KeyedHashSet(initialCapacity, true);
      bundlesBySymbolicName = new HashMap<String, AbstractBundle[]>(initialCapacity);
    }
  }
View Full Code Here


    }
  }

  public synchronized void removeAllBundles() {
    bundlesByInstallOrder.clear();
    bundlesById = new KeyedHashSet();
    bundlesBySymbolicName.clear();
  }
View Full Code Here

  final private KeyedHashSet pkgSources;

  public BundleLoaderProxy(BundleHost bundle, BundleDescription description) {
    this.bundle = bundle;
    this.description = description;
    this.pkgSources = new KeyedHashSet(false);
  }
View Full Code Here

    return null;
  }

  public static synchronized NullPackageSource getNullPackageSource(String name) {
    if (sources == null)
      sources = new KeyedHashSet();
    NullPackageSource result = (NullPackageSource) sources.getByKey(name);
    if (result != null)
      return result;
    result = new NullPackageSource(name);
    sources.add(result);
View Full Code Here

   * Adds a user object
   * @param userObject the user object to add
   */
  public synchronized void addUserObject(KeyedElement userObject) {
    if (userObjects == null)
      userObjects = new KeyedHashSet(5, false);
    synchronized (userObjects) {
      userObjects.add(userObject);
    }
  }
View Full Code Here

        reexportTable = new int[reexportIndex];
        System.arraycopy(reexported, 0, reexportTable, 0, reexportIndex);
      } else {
        reexportTable = null;
      }
      requiredSources = new KeyedHashSet(10, false);
    } else {
      requiredBundles = null;
      reexportTable = null;
      requiredSources = null;
    }
View Full Code Here

      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)
View Full Code Here

    // Note that dynamic imports are not checked to avoid aggressive wiring (bug 105779) 
    return findRequiredSource(pkgName, null);
  }

  private PackageSource findImportedSource(String pkgName, KeyedHashSet visited) {
    KeyedHashSet imports = getImportedSources(visited);
    if (imports == null)
      return null;
    synchronized (imports) {
      return (PackageSource) imports.getByKey(pkgName);
    }
  }
View Full Code Here

      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;
View Full Code Here

      PackageSource result = (PackageSource) requiredSources.getByKey(pkgName);
      if (result != null)
        return result.isNullSource() ? null : result;
    }
    if (visited == null)
      visited = new KeyedHashSet(false);
    visited.add(bundle); // always add ourselves so we do not recurse back to ourselves
    ArrayList result = new ArrayList(3);
    for (int i = 0; i < requiredBundles.length; i++) {
      BundleLoader requiredLoader = requiredBundles[i].getBundleLoader();
      requiredLoader.addExportedProvidersFor(proxy.getSymbolicName(), pkgName, result, visited);
View Full Code Here

TOP

Related Classes of org.eclipse.osgi.framework.util.KeyedHashSet$EquinoxSetIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.