|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ClassLoader org.springframework.osgi.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
.
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 |
findResources(String name)
|
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 |
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 ClassLoader
ClassNotFoundException
protected URL findResource(String name)
findResource
in class ClassLoader
protected Enumeration 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 String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |