public class BundleDelegatingClassLoader extends ClassLoader
DebugUtils
.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) |
protected Class<?> |
loadClass(String name,
boolean resolve) |
String |
toString() |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
protected 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 null
protected Class<?> findClass(String name) throws ClassNotFoundException
findClass
in class ClassLoader
ClassNotFoundException
protected URL findResource(String name)
findResource
in class ClassLoader
protected Enumeration<URL> findResources(String name) throws IOException
findResources
in class ClassLoader
IOException
public URL getResource(String name)
getResource
in class ClassLoader
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
public org.osgi.framework.Bundle getBundle()
Copyright © 2006–2019. All rights reserved.