public class BundleDelegatingClassLoader extends ClassLoader implements org.osgi.framework.BundleReference
| Modifier | Constructor and Description |
|---|---|
protected |
BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle,
ClassLoader bridgeLoader)
Private constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static BundleDelegatingClassLoader |
createBundleClassLoaderFor(org.osgi.framework.Bundle aBundle)
Factory method for creating a class loader over the given bundle.
|
static BundleDelegatingClassLoader |
createBundleClassLoaderFor(org.osgi.framework.Bundle bundle,
ClassLoader bridge)
Factory method for creating a class loader over the given bundle and with
a given class loader as fall-back.
|
protected Class<?> |
findClass(String name) |
protected URL |
findResource(String name) |
protected Enumeration<URL> |
findResources(String name) |
org.osgi.framework.Bundle |
getBundle()
Returns the bundle to which this class loader delegates calls to.
|
URL |
getResource(String name) |
Enumeration<URL> |
getResources(String name) |
protected Class<?> |
loadClass(String name,
boolean resolve) |
String |
toString() |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResourceAsStream, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignersprotected BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle,
ClassLoader bridgeLoader)
BundleDelegatingClassLoader instance.bundle - bridgeLoader - public static BundleDelegatingClassLoader createBundleClassLoaderFor(org.osgi.framework.Bundle aBundle)
aBundle - bundle to use for class loading and resource acquisitionpublic static BundleDelegatingClassLoader createBundleClassLoaderFor(org.osgi.framework.Bundle bundle, ClassLoader bridge)
bundle - bundle used for class loading and resource acquisitionbridge - class loader used as fall back in case the bundle cannot
load a class or find a resource. Can be nullprotected Class<?> findClass(String name) throws ClassNotFoundException
findClass in class ClassLoaderClassNotFoundExceptionprotected URL findResource(String name)
findResource in class ClassLoaderprotected Enumeration<URL> findResources(String name) throws IOException
findResources in class ClassLoaderIOExceptionpublic URL getResource(String name)
getResource in class ClassLoaderpublic Enumeration<URL> getResources(String name) throws IOException
getResources in class ClassLoaderIOExceptionprotected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionpublic org.osgi.framework.Bundle getBundle()
getBundle in interface org.osgi.framework.BundleReferenceCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.