public class

JiraComponentLocator

extends Object
implements ComponentLocator
java.lang.Object
   ↳ com.atlassian.jira.util.JiraComponentLocator

Summary

Public Constructors
JiraComponentLocator()
Public Methods
<T> T getComponent(Class<T> type)
Find a component of the passed class in JIRA.
<T> T getComponentInstanceOfType(Class<T> type)
Find a component of the passed class in JIRA.
@Nonnull <T> Supplier<T> getComponentSupplier(Class<T> type)
Create a com.google.common.base.Supplier for the passed component.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.util.ComponentLocator

Public Constructors

public JiraComponentLocator ()

Public Methods

public T getComponent (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.

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.

public T getComponentInstanceOfType (Class<T> type)

Find a component of the passed class in JIRA.

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.

@Nonnull public Supplier<T> getComponentSupplier (Class<T> type)

Create a com.google.common.base.Supplier for the passed component.

Parameters
type the class of the component to look for. Must not be null.
Returns
  • a com.google.common.base.Supplier for the component.

public String toString ()