public class DefaultComponentClassManager extends Object implements ComponentClassManager
| Constructor and Description |
|---|
DefaultComponentClassManager(com.atlassian.plugin.PluginAccessor pluginAccessor) |
| Modifier and Type | Method and Description |
|---|---|
<T> Class<T> |
loadClass(String className)
Load a class from Jira core, or a plugin including plugins that are not enabled.
|
<T> T |
newInstance(String className)
Instantiates the named class using OSGi ClassLoaders and Pico/Spring injection as appropriate.
|
<T> T |
newInstanceFromPlugin(Class<T> clazz,
com.atlassian.plugin.Plugin plugin)
Instantiates the named class by directly using the plugin the class was loaded from and its autowiring strategy.
|
public DefaultComponentClassManager(com.atlassian.plugin.PluginAccessor pluginAccessor)
public <T> T newInstance(String className) throws ClassNotFoundException
ComponentClassManagernewInstance in interface ComponentClassManagerclassName - the name of the class to instantiate.ClassNotFoundException - if the given className was not able to be loaded.public <T> T newInstanceFromPlugin(Class<T> clazz, com.atlassian.plugin.Plugin plugin)
ComponentClassManagernewInstanceFromPlugin in interface ComponentClassManagerclazz - the class to instantiateplugin - the plugin in which the class was loaded fromComponentClassManager.newInstance(String)public <T> Class<T> loadClass(String className) throws ClassNotFoundException
ComponentClassManagerloadClass in interface ComponentClassManagerT - The Class type.className - Fully qualified class name.ClassNotFoundException - if the given className was not able to be loaded.Copyright © 2002-2021 Atlassian. All Rights Reserved.