|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
org.eclipse.gemini.blueprint.util.BundleDelegatingClassLoader
public class BundleDelegatingClassLoader
ClassLoader backed by an OSGi bundle. Provides the ability to use a separate
class loader as fall back.
Contains facilities for tracing class loading behaviour so that issues can be
easily resolved.
For debugging please see DebugUtils.
| Constructor Summary | |
|---|---|
protected |
BundleDelegatingClassLoader(Bundle bundle,
ClassLoader bridgeLoader)
Private constructor. |
| Method Summary | |
|---|---|
static BundleDelegatingClassLoader |
createBundleClassLoaderFor(Bundle aBundle)
Factory method for creating a class loader over the given bundle. |
static BundleDelegatingClassLoader |
createBundleClassLoaderFor(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)
|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected BundleDelegatingClassLoader(Bundle bundle,
ClassLoader bridgeLoader)
BundleDelegatingClassLoader instance.
bundle - bridgeLoader - | Method Detail |
|---|
public static BundleDelegatingClassLoader createBundleClassLoaderFor(Bundle aBundle)
aBundle - bundle to use for class loading and resource acquisition
public static BundleDelegatingClassLoader createBundleClassLoaderFor(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 ClassLoaderClassNotFoundExceptionprotected URL findResource(String name)
findResource in class ClassLoader
protected Enumeration<URL> findResources(String name)
throws IOException
findResources in class ClassLoaderIOExceptionpublic URL getResource(String name)
getResource in class ClassLoader
protected Class<?> loadClass(String name,
boolean resolve)
throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionpublic String toString()
toString in class Objectpublic Bundle getBundle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||