Package com.atlassian.jira.util
Class JiraComponentFactory
java.lang.Object
com.atlassian.jira.util.JiraComponentFactory
- All Implemented Interfaces:
ComponentFactory
Default implementation of
ComponentFactory
- Since:
- v4.0
-
Method Summary
Modifier and TypeMethodDescription<T> T
createObject
(Class<T> type) Creates a component of the given type, with no arguments.<T> T
createObject
(Class<T> type, Object... arguments) Create an object of the passed type using constructor dependency injection.static JiraComponentFactory
toString()
-
Method Details
-
createObject
Description copied from interface:ComponentFactory
Create an object of the passed type using constructor dependency injection. A runtime exception will be thrown if the object cannot be created.- Specified by:
createObject
in interfaceComponentFactory
- Type Parameters:
T
- the type of the returned object.- Parameters:
type
- the type of the object to create.arguments
- additional objects that can be used to resolve dependencies- Returns:
- return a newly created object.
-
createObject
Creates a component of the given type, with no arguments. This method is explicity declared to keep the workflow designer plugin happy. It's not clear why it can't use the variadic form, maybe it didn't exist in the older API version against which it compiles. The same could be true of other plugins that depend (wrongly) upon jira-core.- Type Parameters:
T
- the type of component- Parameters:
type
- the type of component- Returns:
- the created component
-
toString
-
getInstance
-