| java.lang.Object |
| ↳ |
com.atlassian.plugin.osgi.util.BundleClassLoaderAccessor |
Class Overview
Utility methods for accessing a bundle as if it was a classloader.
Summary
| Public Methods |
|
static
ClassLoader
|
getClassLoader(Bundle bundle, AlternativeResourceLoader alternativeResourceLoader)
Creates a classloader that delegates to the bundle
|
|
static
<T>
Class<T>
|
loadClass(Bundle bundle, String name)
Loads a class from the bundle
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
BundleClassLoaderAccessor
()
Public Methods
public
static
ClassLoader
getClassLoader
(Bundle bundle, AlternativeResourceLoader alternativeResourceLoader)
Creates a classloader that delegates to the bundle
Parameters
| bundle
| The bundle to delegate to |
| alternativeResourceLoader
| An alternative resource loader to bypass bundle, can be null |
Returns
- A new classloader instance
public
static
Class<T>
loadClass
(Bundle bundle, String name)
Loads a class from the bundle
Parameters
| bundle
| The bundle |
| name
| The name of the class to load |
Throws
| ClassNotFoundException
| If the class cannot be found in the bundle
|