|
OPS4J Pax Swissbox :: OSGi Core 1.3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
org.ops4j.pax.swissbox.core.BundleClassLoader
public class BundleClassLoader
Class loader that uses the a bundle in order to implement class loader functionality.
Constructor Summary | |
---|---|
BundleClassLoader(org.osgi.framework.Bundle bundle)
Creates a bundle class loader with no parent. |
|
BundleClassLoader(org.osgi.framework.Bundle bundle,
ClassLoader parent)
Creates a bundle class loader. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
protected Class |
findClass(String name)
Use bundle to find find the class. |
protected URL |
findResource(String name)
Use bundle to find resource. |
protected Enumeration<URL> |
findResources(String name)
Use bundle to find resources. |
org.osgi.framework.Bundle |
getBundle()
Getter. |
URL |
getResource(String name)
If there is a parent class loader use the super implementation that will first use the parent and as a fallback it will call findResource(). |
Enumeration<URL> |
getResources(String name)
If there is a parent class loader use the super implementation that will first use the parent and as a fallback it will call findResources(). |
int |
hashCode()
|
protected Class |
loadClass(String name,
boolean resolve)
If there is a parent class loader use the super implementation that will first use the parent and as a fallback it will call findClass(). |
static BundleClassLoader |
newPriviledged(org.osgi.framework.Bundle bundle)
Privileged factory method. |
static BundleClassLoader |
newPriviledged(org.osgi.framework.Bundle bundle,
ClassLoader parent)
Privileged factory method. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BundleClassLoader(org.osgi.framework.Bundle bundle)
bundle
- bundle to be used for class loading. Cannot be null.public BundleClassLoader(org.osgi.framework.Bundle bundle, ClassLoader parent)
bundle
- bundle to be used for class loading. Cannot be null.parent
- parent class loaderMethod Detail |
---|
public static BundleClassLoader newPriviledged(org.osgi.framework.Bundle bundle)
bundle
- bundle to be used for class loading. Cannot be null.
BundleClassLoader(Bundle)
public static BundleClassLoader newPriviledged(org.osgi.framework.Bundle bundle, ClassLoader parent)
bundle
- bundle to be used for class loading. Cannot be null.parent
- parent class loader
BundleClassLoader(Bundle,ClassLoader)
public org.osgi.framework.Bundle getBundle()
public URL getResource(String name)
getResource
in class ClassLoader
ClassLoader.getResource(String)
public Enumeration<URL> getResources(String name) throws IOException
getResources
in class ClassLoader
IOException
ClassLoader.getResources(String)
protected Class findClass(String name) throws ClassNotFoundException
findClass
in class ClassLoader
ClassNotFoundException
ClassLoader.findClass(String)
protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
ClassLoader.getResource(String)
protected URL findResource(String name)
findResource
in class ClassLoader
ClassLoader.findResource(String)
protected Enumeration<URL> findResources(String name) throws IOException
findResources
in class ClassLoader
IOException
ClassLoader.findResources(String)
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
OPS4J Pax Swissbox :: OSGi Core 1.3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |