|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
com.atlassian.plugin.classloader.PluginClassLoader
public final class PluginClassLoader
A class loader used to load classes and resources from a given plugin.
PluginsClassLoader| Constructor Summary | |
|---|---|
PluginClassLoader(File pluginFile)
|
|
PluginClassLoader(File pluginFile,
ClassLoader parent)
|
|
PluginClassLoader(File pluginFile,
ClassLoader parent,
File tempDirectory)
|
|
| Method Summary | |
|---|---|
void |
close()
|
URL |
getLocalResource(String name)
Gets the resource from this classloader only |
URL |
getResource(String name)
Load the named resource from this plugin. |
protected Class<?> |
loadClass(String name,
boolean resolve)
This implementation of loadClass uses a child first delegation model rather than the standard parent first. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PluginClassLoader(File pluginFile)
pluginFile - file reference to the jar for this plugin
public PluginClassLoader(File pluginFile,
ClassLoader parent)
pluginFile - file reference to the jar for this pluginparent - the parent class loader
public PluginClassLoader(File pluginFile,
ClassLoader parent,
File tempDirectory)
pluginFile - file reference to the jar for this pluginparent - the parent class loadertempDirectory - the temporary directory to store inner jars| Method Detail |
|---|
protected Class<?> loadClass(String name,
boolean resolve)
throws ClassNotFoundException
ClassLoader.loadClass(String, boolean) mechanism.
loadClass in class ClassLoadername - Class to loadresolve - true to resolve all class dependencies when loaded
ClassNotFoundException - if the class cannot be found in this class loader or its parentpublic URL getResource(String name)
getResource in class ClassLoadername - the name of the resource.
null if the resource was not found.public URL getLocalResource(String name)
name - the name of the resource
null if the resource was not foundpublic void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||