public Class<?> loadClass(String name) throws ClassNotFoundException { return supplier.getBundleLoader().findLocalClass(name); }
public Enumeration<URL> getResources(String name) { return supplier.getBundleLoader().findLocalResources(name); }
public URL getResource(String name) { return supplier.getBundleLoader().findLocalResource(name); }
protected BundleLoader getBundleLoader() { BundleLoaderProxy curProxy = getLoaderProxy(); return curProxy == null ? null : curProxy.getBundleLoader(); }
public URL getResource(String name) { return supplier.getBundleLoader().findLocalResource(name); }
protected BundleLoader getBundleLoader() { BundleLoaderProxy curProxy = getLoaderProxy(); return curProxy == null ? null : curProxy.getBundleLoader(); }
public Class<?> loadClass(String name) throws ClassNotFoundException { return supplier.getBundleLoader().findLocalClass(name); }
public Enumeration<URL> getResources(String name) { return supplier.getBundleLoader().findLocalResources(name); }
public URL loadResource(String name) { if (allDependents == null) return null; URL result = null; int size = allDependents.size(); for (int i = 0; i < size && result == null; i++) { BundleLoaderProxy proxy = buddyRequester.getLoaderProxy(allDependents.get(i)); if (proxy == null) continue; result = proxy.getBundleLoader().findResource(name); } return result; }
public URL loadResource(String name) { if (allDependents == null) return null; URL result = null; int size = allDependents.size(); for (int i = 0; i < size && result == null; i++) { BundleLoaderProxy proxy = buddyRequester.getLoaderProxy(allDependents.get(i)); if (proxy == null) continue; result = proxy.getBundleLoader().findResource(name); } return result; }
@Override public Collection<String> listResources(String path, String filePattern) { BundleClassLoader bcl = supplier.getBundleLoader().createClassLoader(); return bcl.listLocalResources(path, filePattern, 0); } }
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$ } }
@Override public Collection<String> listResources(String path, String filePattern) { BundleClassLoader bcl = supplier.getBundleLoader().createClassLoader(); return bcl.listLocalResources(path, filePattern, 0); } }
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$ } }
/** * Gets the class loader for the host bundle. This may end up * creating the bundle class loader if it was not already created. * A null value may be returned if the bundle is not resolved. * @return the bundle class loader or null if the bundle is not resolved. */ public ClassLoader getClassLoader() { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(new RuntimePermission("getClassLoader")); //$NON-NLS-1$ BundleLoaderProxy curProxy = getLoaderProxy(); BundleLoader loader = curProxy == null ? null : curProxy.getBundleLoader(); BundleClassLoader bcl = loader == null ? null : loader.createClassLoader(); return (bcl instanceof ClassLoader) ? (ClassLoader) bcl : null; }
/** * Gets the class loader for the host bundle. This may end up * creating the bundle class loader if it was not already created. * A null value may be returned if the bundle is not resolved. * @return the bundle class loader or null if the bundle is not resolved. */ public ClassLoader getClassLoader() { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(new RuntimePermission("getClassLoader")); //$NON-NLS-1$ BundleLoaderProxy curProxy = getLoaderProxy(); BundleLoader loader = curProxy == null ? null : curProxy.getBundleLoader(); BundleClassLoader bcl = loader == null ? null : loader.createClassLoader(); return (bcl instanceof ClassLoader) ? (ClassLoader) bcl : null; }
private BundleClassLoader getBundleClassLoader() { Object o = BundleDescriptionImpl.this.getUserObject(); if (!(o instanceof BundleLoaderProxy)) { if (o instanceof BundleReference) o = ((BundleReference) o).getBundle(); if (o instanceof BundleHost) o = ((BundleHost) o).getLoaderProxy(); } if (o instanceof BundleLoaderProxy) return ((BundleLoaderProxy) o).getBundleLoader().createClassLoader(); return null; }
private BundleClassLoader getBundleClassLoader() { Object o = BundleDescriptionImpl.this.getUserObject(); if (!(o instanceof BundleLoaderProxy)) { if (o instanceof BundleReference) o = ((BundleReference) o).getBundle(); if (o instanceof BundleHost) o = ((BundleHost) o).getLoaderProxy(); } if (o instanceof BundleLoaderProxy) return ((BundleLoaderProxy) o).getBundleLoader().createClassLoader(); return null; }
final PackageSource createExportPackageSource(ExportPackageDescription export, KeyedHashSet visited) { BundleLoaderProxy exportProxy = getLoaderProxy(export.getExporter()); if (exportProxy == null) // TODO log error!! return null; PackageSource requiredSource = exportProxy.getBundleLoader().findRequiredSource(export.getName(), visited); PackageSource exportSource = exportProxy.createPackageSource(export, false); if (requiredSource == null) return exportSource; return createMultiSource(export.getName(), new PackageSource[] {requiredSource, exportSource}); }
final PackageSource createExportPackageSource(ExportPackageDescription export, KeyedHashSet visited) { BundleLoaderProxy exportProxy = getLoaderProxy(export.getExporter()); if (exportProxy == null) // TODO log error!! return null; PackageSource requiredSource = exportProxy.getBundleLoader().findRequiredSource(export.getName(), visited); PackageSource exportSource = exportProxy.createPackageSource(export, false); if (requiredSource == null) return exportSource; return createMultiSource(export.getName(), new PackageSource[] {requiredSource, exportSource}); }