com.atlassian.plugin.classloader
Class PluginsClassLoader
java.lang.Object
java.lang.ClassLoader
com.atlassian.plugin.classloader.PluginsClassLoader
public class PluginsClassLoader
- extends java.lang.ClassLoader
A ClassLoader that will loop over all enabled Plugins, attempting to load the given class (or other resource) from
the ClassLoader of each plugin in turn.
- See Also:
PluginClassLoader
| Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PluginsClassLoader
public PluginsClassLoader(PluginAccessor pluginAccessor)
PluginsClassLoader
public PluginsClassLoader(java.lang.ClassLoader parent,
PluginAccessor pluginAccessor)
- Deprecated. Since 2.5.0, use
PluginsClassLoader(ClassLoader, PluginAccessor, PluginEventManager) instead
PluginsClassLoader
public PluginsClassLoader(java.lang.ClassLoader parent,
PluginAccessor pluginAccessor,
PluginEventManager pluginEventManager)
- Parameters:
parent - The parent classloaderpluginAccessor - The plugin accessorpluginEventManager - The plugin event manager- Since:
- 2.5.0
findResource
protected java.net.URL findResource(java.lang.String name)
findClass
protected java.lang.Class<?> findClass(java.lang.String className)
throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
notifyUninstallPlugin
public void notifyUninstallPlugin(Plugin plugin)
getPluginForClass
public Plugin getPluginForClass(java.lang.String className)
- Returns the Plugin that will be used to load the given class name.
If no enabled plugin can load the given class, then null is returned.
- Parameters:
className - the Class name
- Returns:
- the Plugin that will be used to load the given class name.
- Since:
- 2.3
onPluginEnabled
public void onPluginEnabled(PluginEnabledEvent event)
onPluginModuleEnabled
public void onPluginModuleEnabled(PluginModuleEnabledEvent event)
notifyPluginOrModuleEnabled
public void notifyPluginOrModuleEnabled()
findResources
protected java.util.Enumeration<java.net.URL> findResources(java.lang.String name)
throws java.io.IOException
- The default implementation returns a "singleton" enumeration over the result
of
findResource(String).
- Overrides:
findResources in class java.lang.ClassLoader
- Parameters:
name - the name of the resource
- Returns:
- an enumeration over all matching resources
- Throws:
java.io.IOException - This implementation will not throw this exception
Copyright © 2012 Atlassian. All Rights Reserved.