public final class PluginClassLoader extends ClassLoader
PluginsClassLoader| Constructor and Description |
|---|
PluginClassLoader(File pluginFile) |
PluginClassLoader(File pluginFile,
ClassLoader parent) |
PluginClassLoader(File pluginFile,
ClassLoader parent,
File tempDirectory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
URL |
getLocalResource(String name)
Gets the resource from this classloader only
|
List<File> |
getPluginInnerJars() |
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.
|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic PluginClassLoader(File pluginFile)
pluginFile - file reference to the jar for this pluginpublic PluginClassLoader(File pluginFile, ClassLoader parent)
pluginFile - file reference to the jar for this pluginparent - the parent class loaderpublic 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 jarsprotected 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 loadedClassNotFoundException - 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 resourcenull if the resource was not foundpublic void close()
Copyright © 2019 Atlassian. All rights reserved.