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
ComponentClassManager
newInstance
in interface ComponentClassManager
className
- 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)
ComponentClassManager
newInstanceFromPlugin
in interface ComponentClassManager
clazz
- the class to instantiateplugin
- the plugin in which the class was loaded fromComponentClassManager.newInstance(String)
public <T> Class<T> loadClass(String className) throws ClassNotFoundException
ComponentClassManager
loadClass
in interface ComponentClassManager
T
- The Class type.className
- Fully qualified class name.ClassNotFoundException
- if the given className was not able to be loaded.Copyright © 2002-2019 Atlassian. All Rights Reserved.