|
||||||||||
| 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(java.io.File pluginFile)
|
|
PluginClassLoader(java.io.File pluginFile,
java.lang.ClassLoader parent)
|
|
PluginClassLoader(java.io.File pluginFile,
java.lang.ClassLoader parent,
java.io.File tempDirectory)
|
|
| Method Summary | |
|---|---|
void |
close()
|
java.net.URL |
getLocalResource(java.lang.String name)
Gets the resource from this classloader only |
java.net.URL |
getResource(java.lang.String name)
Load the named resource from this plugin. |
protected java.lang.Class<?> |
loadClass(java.lang.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.ClassLoader |
|---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PluginClassLoader(java.io.File pluginFile)
pluginFile - file reference to the jar for this plugin
public PluginClassLoader(java.io.File pluginFile,
java.lang.ClassLoader parent)
pluginFile - file reference to the jar for this pluginparent - the parent class loader
public PluginClassLoader(java.io.File pluginFile,
java.lang.ClassLoader parent,
java.io.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 java.lang.Class<?> loadClass(java.lang.String name,
boolean resolve)
throws java.lang.ClassNotFoundException
ClassLoader.loadClass(String, boolean) mechanism.
loadClass in class java.lang.ClassLoadername - Class to loadresolve - true to resolve all class dependencies when loaded
java.lang.ClassNotFoundException - if the class cannot be found in this class loader or its parentpublic java.net.URL getResource(java.lang.String name)
getResource in class java.lang.ClassLoadername - the name of the resource.
null if the resource was not found.public java.net.URL getLocalResource(java.lang.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 | |||||||||