Package com.atlassian.jira.util
Class JiraComponentLocator
java.lang.Object
com.atlassian.jira.util.JiraComponentLocator
- All Implemented Interfaces:
ComponentLocator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TgetComponent(Class<T> type) Find a component of the passed class in JIRA.<T> TgetComponentInstanceOfType(Class<T> type) Find a component of the passed class in JIRA.<T> com.google.common.base.Supplier<T> getComponentSupplier(Class<T> type) Create aSupplierfor the passed component.toString()
-
Constructor Details
-
JiraComponentLocator
public JiraComponentLocator()
-
-
Method Details
-
getComponentInstanceOfType
Description copied from interface:ComponentLocatorFind a component of the passed class in JIRA.- Specified by:
getComponentInstanceOfTypein interfaceComponentLocator- 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
Description copied from interface:ComponentLocatorFind a component of the passed class in JIRA. This is a synonym forComponentLocator.getComponentInstanceOfType(Class)but has a shorter and more meaningful name.- Specified by:
getComponentin interfaceComponentLocator- 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.
-
getComponentSupplier
Description copied from interface:ComponentLocatorCreate aSupplierfor the passed component.- Specified by:
getComponentSupplierin interfaceComponentLocator- 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
Supplierfor the component.
-
toString
-