com.atlassian.jira.util
Interface ComponentLocator

All Known Implementing Classes:
JiraComponentLocator

@InjectableComponent
public interface ComponentLocator

A locator that allows components to be looked up at runtime.

Since:
v4.0

Method Summary
<T> T
getComponent(java.lang.Class<T> type)
          Find a component of the passed class in JIRA.
<T> T
getComponentInstanceOfType(java.lang.Class<T> type)
          Find a component of the passed class in JIRA.
 

Method Detail

getComponentInstanceOfType

<T> T getComponentInstanceOfType(java.lang.Class<T> type)
Find a component of the passed class in JIRA.

Type Parameters:
T - the type of the component to look for.
Parameters:
type - the class of the component to look for. Must not be null.
Returns:
a refernce to the component or null if it could not be found.

getComponent

<T> T getComponent(java.lang.Class<T> type)
Find a component of the passed class in JIRA. This is a synonym for getComponentInstanceOfType(Class) but has a shorter and more meaningful name.

Type Parameters:
T - the type of the component to look for.
Parameters:
type - the class of the component to look for. Must not be null.
Returns:
a refernce to the component or null if it could not be found.


Copyright © 2002-2010 Atlassian. All Rights Reserved.