Package com.atlassian.jira.util
Interface ComponentLocator
- All Known Implementing Classes:
JiraComponentLocator
A locator that allows components to be looked up at runtime.
- Since:
- v4.0
-
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.
-
Method Details
-
getComponentInstanceOfType
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
Find a component of the passed class in JIRA. This is a synonym forgetComponentInstanceOfType(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.
-
getComponentSupplier
Create aSupplierfor the passed component.- 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. - Since:
- 6.2.3.
-