public class BundleDelegatingClassLoader extends ClassLoader
ClassLoader
implementation delegating to a given OSGi bundle, and to the specified ClassLoader
as a fallback.Modifier and Type | Field and Description |
---|---|
protected org.osgi.framework.Bundle |
bundle
The bundle which loaded Ignite.
|
protected ClassLoader |
clsLdr
The fallback classloader, expected to be the ignite-core classloader.
|
Constructor and Description |
---|
BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle)
Constructor.
|
BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle,
ClassLoader classLoader)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected ClassNotFoundException |
classNotFoundException(String clsName)
Builds a
ClassNotFoundException . |
protected Class<?> |
findClass(String name) |
protected URL |
findResource(String name) |
protected Enumeration |
findResources(String name)
Finds a given resource from within the
bundle . |
org.osgi.framework.Bundle |
getBundle()
Returns the
Bundle to which this ClassLoader is associated. |
protected Class<?> |
loadClass(String name,
boolean resolve)
|
String |
toString() |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
protected final org.osgi.framework.Bundle bundle
@GridToStringExclude protected final ClassLoader clsLdr
public BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle)
bundle
- The bundlepublic BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle, ClassLoader classLoader)
bundle
- The bundle.classLoader
- Fallback classloader.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
bundle
.findResources
in class ClassLoader
name
- The resource name.IOException
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
name
- Class name.resolve
- true
to resolve the class.ClassNotFoundException
public org.osgi.framework.Bundle getBundle()
Bundle
to which this ClassLoader is associated.protected ClassNotFoundException classNotFoundException(String clsName)
ClassNotFoundException
.clsName
- Class name.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019