public class

DefaultComponentClassManager

extends Object
implements ComponentClassManager
java.lang.Object
   ↳ com.atlassian.jira.plugin.DefaultComponentClassManager

Summary

Public Constructors
DefaultComponentClassManager(PluginAccessor pluginAccessor)
Public Methods
<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, Plugin plugin)
Instantiates the named class by directly using the plugin the class was loaded from and its autowiring strategy.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.plugin.ComponentClassManager

Public Constructors

public DefaultComponentClassManager (PluginAccessor pluginAccessor)

Public Methods

public Class<T> loadClass (String className)

Load a class from Jira core, or a plugin including plugins that are not enabled.

Parameters
className Fully qualified class name.
Returns
  • the loaded Class of type T.

public T newInstance (String className)

Instantiates the named class using OSGi ClassLoaders and Pico/Spring injection as appropriate.

Parameters
className the name of the class to instantiate.
Returns
  • the instance of the requested class.

public T newInstanceFromPlugin (Class<T> clazz, Plugin plugin)

Instantiates the named class by directly using the plugin the class was loaded from and its autowiring strategy.

Parameters
clazz the class to instantiate
plugin the plugin in which the class was loaded from
Returns
  • the instance of the requested class.