Package com.atlassian.jira.plugin
Class DefaultComponentClassManager
java.lang.Object
com.atlassian.jira.plugin.DefaultComponentClassManager
- All Implemented Interfaces:
ComponentClassManager
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultComponentClassManager
(com.atlassian.plugin.PluginAccessor pluginAccessor) -
Method Summary
Modifier and TypeMethodDescription<T> Class<T>
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.
-
Constructor Details
-
DefaultComponentClassManager
public DefaultComponentClassManager(com.atlassian.plugin.PluginAccessor pluginAccessor)
-
-
Method Details
-
newInstance
Description copied from interface:ComponentClassManager
Instantiates the named class using OSGi ClassLoaders and Pico/Spring injection as appropriate.- Specified by:
newInstance
in interfaceComponentClassManager
- Parameters:
className
- the name of the class to instantiate.- Returns:
- the instance of the requested class.
- Throws:
ClassNotFoundException
- if the given className was not able to be loaded.
-
newInstanceFromPlugin
Description copied from interface:ComponentClassManager
Instantiates the named class by directly using the plugin the class was loaded from and its autowiring strategy.- Specified by:
newInstanceFromPlugin
in interfaceComponentClassManager
- Parameters:
clazz
- the class to instantiateplugin
- the plugin in which the class was loaded from- Returns:
- the instance of the requested class.
- See Also:
-
loadClass
Description copied from interface:ComponentClassManager
Load a class from Jira core, or a plugin including plugins that are not enabled.- Specified by:
loadClass
in interfaceComponentClassManager
- Type Parameters:
T
- The Class type.- Parameters:
className
- Fully qualified class name.- Returns:
- the loaded Class of type T.
- Throws:
ClassNotFoundException
- if the given className was not able to be loaded.
-