Class JiraComponentLocator

java.lang.Object
com.atlassian.jira.util.JiraComponentLocator
All Implemented Interfaces:
ComponentLocator

public class JiraComponentLocator extends Object implements ComponentLocator
  • Constructor Details

    • JiraComponentLocator

      public JiraComponentLocator()
  • Method Details

    • 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.
    • getComponentSupplier

      @Nonnull public <T> com.google.common.base.Supplier<T> getComponentSupplier(Class<T> type)
      Description copied from interface: ComponentLocator
      Create a Supplier for the passed component.
      Specified by:
      getComponentSupplier 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 Supplier for the component.
    • toString

      public String toString()
      Overrides:
      toString in class Object