com.atlassian.jira.util
Interface ComponentFactory

All Known Implementing Classes:
JiraComponentFactory

public interface ComponentFactory

A factory that allows objects to be created through constructor dependency injection at runtime.

Since:
v4.0

Method Summary
<T> T
createObject(java.lang.Class<T> type)
          Create an object of the passed type using constructor dependency injection.
<T> T
createObject(java.lang.Class<T> type, java.lang.Object... arguments)
          Create an object of the passed type using constructor dependency injection.
 

Method Detail

createObject

<T> T createObject(java.lang.Class<T> type,
                   java.lang.Object... arguments)
Create an object of the passed type using constructor dependency injection. A runtime exception will be thrown if the object cannot be created.

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

<T> T createObject(java.lang.Class<T> type)
Create an object of the passed type using constructor dependency injection. A runtime exception will be thrown if the object cannot be created.

Type Parameters:
T - the type of the returned object.
Parameters:
type - the type of the object to create.
Returns:
return a newly created object.


Copyright © 2002-2010 Atlassian. All Rights Reserved.