public class BundleClassLoaderAccessor extends Object
| Constructor and Description |
|---|
BundleClassLoaderAccessor() |
| Modifier and Type | Method and Description |
|---|---|
static ClassLoader |
getClassLoader(org.osgi.framework.Bundle bundle,
AlternativeResourceLoader alternativeResourceLoader)
Creates a classloader that delegates to the bundle
|
static <T> Class<T> |
loadClass(org.osgi.framework.Bundle bundle,
String name)
Loads a class from the bundle
|
public static ClassLoader getClassLoader(org.osgi.framework.Bundle bundle, AlternativeResourceLoader alternativeResourceLoader)
bundle - The bundle to delegate toalternativeResourceLoader - An alternative resource loader to bypass bundle, can be nullpublic static <T> Class<T> loadClass(org.osgi.framework.Bundle bundle, String name) throws ClassNotFoundException
T - The type of the classbundle - The bundlename - The name of the class to loadClassNotFoundException - If the class cannot be found in the bundleCopyright © 2014 Atlassian. All rights reserved.