Package org.eclipse.osgi.baseadaptor.loader

Examples of org.eclipse.osgi.baseadaptor.loader.ClasspathManager


  protected BundleEntry findBundleEntry(URL url, AbstractBundle bundle) throws IOException {
    BaseClassLoader classloader = getBundleClassLoader(bundle);
    if (classloader == null)
      throw new FileNotFoundException(url.getPath());
    ClasspathManager cpManager = classloader.getClasspathManager();
    BundleEntry entry = cpManager.findLocalEntry(url.getPath(), url.getPort());
    if (entry == null)
      // this isn't strictly needed but is kept to maintain compatibility
      entry = cpManager.findLocalEntry(url.getPath());
    if (entry == null)
      throw new FileNotFoundException(url.getPath());
    return entry;
  }
View Full Code Here


        this.hook = hook;
        this.delegate = delegate;
        this.domain = domain;
        this.bundle = bundle;

        this.manager = new ClasspathManager(bundledata, classpath, this);
    }
View Full Code Here

      cp = new String[0];
    }
    if (cp == null)
      cp = new String[0];
    // this is not optimized; degenerate case of someone calling getResource on an unresolved bundle!
    ClasspathManager cm = new ClasspathManager(this, cp, null);
    cm.initialize();
    Enumeration<URL> result = cm.findLocalResources(path);
    // no need to close ClassPathManager because the BundleFile objects are stored in the BaseData and closed on shutdown or uninstall
    return result;
  }
View Full Code Here

  protected BundleEntry findBundleEntry(URL url, AbstractBundle bundle) throws IOException {
    BaseClassLoader classloader = getBundleClassLoader(bundle);
    if (classloader == null)
      throw new FileNotFoundException(url.getPath());
    ClasspathManager cpManager = classloader.getClasspathManager();
    int index = url.getPort();
    BundleEntry entry = null;
    if (index == 0) {
      entry = cpManager.findLocalEntry(url.getPath());
    } else {
      Enumeration entries = cpManager.findLocalEntries(url.getPath());
      if (entries != null)
        for (int i = 0; entries.hasMoreElements() && i <= index; i++)
          entry = (BundleEntry) entries.nextElement();
    }
    if (entry == null)
View Full Code Here

        this.hook = hook;
        this.delegate = delegate;
        this.domain = domain;
        this.bundle = bundle;

        this.manager = new ClasspathManager(bundledata, classpath, this);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.osgi.baseadaptor.loader.ClasspathManager

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.