public class BundleClassLoader extends ClassLoader implements org.osgi.framework.BundleReference
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResourceAsStream, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic 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 loaderpublic 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 loaderBundleClassLoader(Bundle,ClassLoader)public org.osgi.framework.Bundle getBundle()
getBundle in interface org.osgi.framework.BundleReferencepublic URL getResource(String name)
getResource in class ClassLoaderClassLoader.getResource(String)public Enumeration<URL> getResources(String name) throws IOException
getResources in class ClassLoaderIOExceptionClassLoader.getResources(String)protected Class<?> findClass(String name) throws ClassNotFoundException
findClass in class ClassLoaderClassNotFoundExceptionClassLoader.findClass(String)protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionClassLoader.getResource(String)protected URL findResource(String name)
findResource in class ClassLoaderClassLoader.findResource(String)protected Enumeration<URL> findResources(String name) throws IOException
findResources in class ClassLoaderIOExceptionClassLoader.findResources(String)Copyright © 2006–2015 OPS4J - Open Participation Software for Java. All rights reserved.