com.atlassian.jira.util
Class JiraComponentFactory

java.lang.Object
  extended by com.atlassian.jira.util.JiraComponentFactory
All Implemented Interfaces:
ComponentFactory

public final class JiraComponentFactory
extends Object
implements ComponentFactory

Default implementation of ComponentFactory that uses JiraUtils.loadComponent(Class, java.util.Collection) and JiraUtils.loadComponent(Class).

Since:
v4.0

Method Summary
<T> T
createObject(Class<T> type)
          Create an object of the passed type using constructor dependency injection.
<T> T
createObject(Class<T> type, Object... arguments)
          Create an object of the passed type using constructor dependency injection.
static JiraComponentFactory getInstance()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createObject

public <T> T createObject(Class<T> type,
                          Object... arguments)
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 interface ComponentFactory
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

public <T> T createObject(Class<T> type)
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 interface ComponentFactory
Type Parameters:
T - the type of the returned object.
Parameters:
type - the type of the object to create.
Returns:
return a newly created object.

toString

public String toString()
Overrides:
toString in class Object

getInstance

public static JiraComponentFactory getInstance()


Copyright © 2002-2014 Atlassian. All Rights Reserved.