com.atlassian.jira.plugin
Class PluginInjector
java.lang.Object
com.atlassian.jira.plugin.PluginInjector
public class PluginInjector
- extends Object
A helper class for doing Dependency Injection on classes living in plugins.
- Since:
- v4.0
Method Summary |
static
|
newInstance(Class<T> clazz,
com.atlassian.plugin.Plugin plugin)
Returns a new instance of the given class with dependencies injected in a way appropriate to the plugin it comes from. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PluginInjector
public PluginInjector()
newInstance
public static <T> T newInstance(Class<T> clazz,
com.atlassian.plugin.Plugin plugin)
- Returns a new instance of the given class with dependencies injected in a way appropriate to the plugin it comes from.
If this class comes from an OSGi plugin, it will be injected by Spring, else it will be injected by Pico.
- Type Parameters:
T
- The type of the object to be constructed.- Parameters:
clazz
- The class to construct.plugin
- The Plugin that the class comes from.
- Returns:
- a new instance of the given class with dependencies injected in a way appropriate to the plugin it comes from.
Copyright © 2002-2011 Atlassian. All Rights Reserved.