com.atlassian.jira.util
Class JiraComponentLocator
java.lang.Object
com.atlassian.jira.util.JiraComponentLocator
- All Implemented Interfaces:
- ComponentLocator
public class JiraComponentLocator
- extends Object
- implements ComponentLocator
Implementation of the ComponentLocator interface. Uses JIRAs ComponentManager.getComponentInstanceOfType(Class) method to actually do the lookup.
- Since:
- v4.0
JiraComponentLocator
public JiraComponentLocator()
getComponentInstanceOfType
public <T> T getComponentInstanceOfType(Class<T> type)
- Description copied from interface:
ComponentLocator
- Find a component of the passed class in JIRA.
- Specified by:
getComponentInstanceOfType in interface ComponentLocator
- 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
public <T> T getComponent(Class<T> type)
- Description copied from interface:
ComponentLocator
- Find a component of the passed class in JIRA. This is a synonym for
ComponentLocator.getComponentInstanceOfType(Class) but has a shorter and more
meaningful name.
- Specified by:
getComponent in interface ComponentLocator
- 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.
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2002-2012 Atlassian. All Rights Reserved.