com.atlassian.jira.plugin
Class DefaultComponentClassManager
java.lang.Object
com.atlassian.jira.plugin.DefaultComponentClassManager
- All Implemented Interfaces:
- ComponentClassManager
public class DefaultComponentClassManager
- extends Object
- implements ComponentClassManager
Method Summary |
|
loadClass(String className)
Load a class from Jira core, or a plugin including plugins that are not enabled. |
|
newInstance(String className)
Instantiates the named class using OSGi ClassLoaders and Pico/Spring injection as appropriate. |
|
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultComponentClassManager
public DefaultComponentClassManager(com.atlassian.plugin.PluginAccessor pluginAccessor)
newInstance
public <T> T newInstance(String className)
throws ClassNotFoundException
- Description copied from interface:
ComponentClassManager
- Instantiates the named class using OSGi ClassLoaders and Pico/Spring injection as appropriate.
- Specified by:
newInstance
in interface ComponentClassManager
- 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
public <T> T newInstanceFromPlugin(Class<T> clazz,
com.atlassian.plugin.Plugin plugin)
- 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 interface ComponentClassManager
- Parameters:
clazz
- the class to instantiateplugin
- the plugin in which the class was loaded from
- Returns:
- the instance of the requested class.
- See Also:
ComponentClassManager.newInstance(String)
loadClass
public <T> Class<T> loadClass(String className)
throws ClassNotFoundException
- Description copied from interface:
ComponentClassManager
- Load a class from Jira core, or a plugin including plugins that are not enabled.
- Specified by:
loadClass
in interface ComponentClassManager
- 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.
Copyright © 2002-2012 Atlassian. All Rights Reserved.