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}); }
/** * Finds a resource local to this bundle. Only the classloader for this bundle is searched. * @param name The name of the resource to find. * @return The URL to the resource or null if the resource is not found. */ public URL findLocalResource(final String name) { return getModuleClassLoader().findLocalResource(name); }
/** * Returns an Enumeration of URLs representing all the resources with * the given name. Only the classloader for this bundle is searched. * * @param name the resource name * @return an Enumeration of URLs for the resources */ public Enumeration<URL> findLocalResources(String name) { return getModuleClassLoader().findLocalResources(name); }
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}); }
/** * This method gets a resource from the bundle. The resource is searched * for in the same manner as it would if it was being loaded from a bundle * (i.e. all hosts, fragments, import, required bundles and * local resources are searched). * * @param name the name of the desired resource. * @return the resulting resource URL or null if it does not exist. */ final URL getResource(String name) { return getModuleClassLoader().getResource(name); }
@Override public Collection<String> listResources(String path, String filePattern) { ModuleClassLoader mcl = supplier.getModuleClassLoader(); return mcl.listLocalResources(path, filePattern, 0); } }
public Enumeration<URL> getResources(String name) { Enumeration<URL> results = null; for (int i = 0; i < suppliers.length; i++) results = BundleLoader.compoundEnumerations(results, suppliers[i].getResources(name)); return results; }
public Class<?> loadClass(String name) throws ClassNotFoundException { if (isFiltered(name, getId())) return null; return super.loadClass(name); }
public URL getResource(String name) { if (isFiltered(name, getId())) return null; return super.getResource(name); }
synchronized public void attachFragment(BundleFragment fragment) throws BundleException { super.attachFragment(fragment); synchronized (extPackages) { addExtPackages(fragment); } }
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}); }
/** * Finds a resource local to this bundle. Only the classloader for this bundle is searched. * @param name The name of the resource to find. * @return The URL to the resource or null if the resource is not found. */ public URL findLocalResource(final String name) { return getModuleClassLoader().findLocalResource(name); }
/** * This method gets a resource from the bundle. The resource is searched * for in the same manner as it would if it was being loaded from a bundle * (i.e. all hosts, fragments, import, required bundles and * local resources are searched). * * @param name the name of the desired resource. * @return the resulting resource URL or null if it does not exist. */ final URL getResource(String name) { return getModuleClassLoader().getResource(name); }
/** * Returns an Enumeration of URLs representing all the resources with * the given name. Only the classloader for this bundle is searched. * * @param name the resource name * @return an Enumeration of URLs for the resources */ public Enumeration<URL> findLocalResources(String name) { return getModuleClassLoader().findLocalResources(name); }
@Override public Collection<String> listResources(String path, String filePattern) { ModuleClassLoader mcl = supplier.getModuleClassLoader(); return mcl.listLocalResources(path, filePattern, 0); } }
public Class<?> loadClass(String name) throws ClassNotFoundException { if (isFiltered(name, getId())) return null; return super.loadClass(name); }
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}); }
/** * Finds a resource local to this bundle. Only the classloader for this bundle is searched. * @param name The name of the resource to find. * @return The URL to the resource or null if the resource is not found. */ public URL findLocalResource(final String name) { return getModuleClassLoader().findLocalResource(name); }
/** * This method gets a resource from the bundle. The resource is searched * for in the same manner as it would if it was being loaded from a bundle * (i.e. all hosts, fragments, import, required bundles and * local resources are searched). * * @param name the name of the desired resource. * @return the resulting resource URL or null if it does not exist. */ final URL getResource(String name) { return getModuleClassLoader().getResource(name); }
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}); }