Package org.eclipse.osgi.framework.adaptor

Examples of org.eclipse.osgi.framework.adaptor.BundleClassLoader


  }

  private void checkClassLoader() {
    BundleLoaderProxy proxy = getLoaderProxy();
    if (proxy != null && proxy.inUse() && proxy.getBundleLoader() != null) {
      BundleClassLoader loader = proxy.getBundleLoader().createClassLoader();
      loader.getResource("dummy"); //$NON-NLS-1$
    }
  }
View Full Code Here


    public List<URL> findEntries(String path, String filePattern, int options) {
      if (!hasResourcePermission() || !isInUse())
        return null;
      @SuppressWarnings("unchecked")
      List<URL> result = Collections.EMPTY_LIST;
      BundleClassLoader bcl = getBundleClassLoader();
      if (bcl != null)
        result = bcl.findEntries(path, filePattern, options);
      return Collections.unmodifiableList(result);
    }
View Full Code Here

    public Collection<String> listResources(String path, String filePattern, int options) {
      if (!hasResourcePermission() || !isInUse())
        return null;
      @SuppressWarnings("unchecked")
      Collection<String> result = Collections.EMPTY_LIST;
      BundleClassLoader bcl = getBundleClassLoader();
      if (bcl != null)
        result = bcl.listResources(path, filePattern, options);
      return Collections.unmodifiableCollection(result);
    }
View Full Code Here

  }

  private void checkClassLoader() {
    BundleLoaderProxy proxy = getLoaderProxy();
    if (proxy != null && proxy.inUse() && proxy.getBundleLoader() != null) {
      BundleClassLoader loader = proxy.getBundleLoader().createClassLoader();
      loader.getResource("dummy"); //$NON-NLS-1$
    }
  }
View Full Code Here

    return result;
  }

  @Override
  public Collection<String> listResources(String path, String filePattern) {
    BundleClassLoader bcl = supplier.getBundleLoader().createClassLoader();
    return bcl.listLocalResources(path, filePattern, 0);
  }
View Full Code Here

  public ClassLoader getClassLoader(Bundle b)
  {
    BundleHost host = (BundleHost) b;
    BundleLoaderProxy lp = host.getLoaderProxy();
    BundleLoader bl = (lp == null) ? null : lp.getBasicBundleLoader();
    BundleClassLoader cl = (bl == null) ? null : bl.createClassLoader();
   
    return ((cl instanceof ClassLoader) ? (ClassLoader)cl : null);
  }
View Full Code Here

    public ClassLoader getClassLoader(Bundle b) {
        BundleHost host = (BundleHost) b;
        BundleLoaderProxy lp = host.getLoaderProxy();
        BundleLoader bl = (lp == null) ? null : lp.getBasicBundleLoader();
        BundleClassLoader cl = (bl == null) ? null : bl.createClassLoader();

        return ((cl instanceof ClassLoader) ? (ClassLoader) cl : null);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.osgi.framework.adaptor.BundleClassLoader

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.