Class JiraComponentFactory

java.lang.Object
com.atlassian.jira.util.JiraComponentFactory
All Implemented Interfaces:
ComponentFactory

public final class JiraComponentFactory extends Object implements ComponentFactory
Default implementation of ComponentFactory
Since:
v4.0
  • Method Details

    • createObject

      public <T> T createObject(Class<T> type, Object... arguments)
      Description copied from interface: ComponentFactory
      Create an object of the passed type using constructor dependency injection. A runtime exception will be thrown if the object cannot be created.
      Specified by:
      createObject in interface ComponentFactory
      Type Parameters:
      T - the type of the returned object.
      Parameters:
      type - the type of the object to create.
      arguments - additional objects that can be used to resolve dependencies
      Returns:
      return a newly created object.
    • createObject

      public <T> T createObject(Class<T> type)
      Creates a component of the given type, with no arguments. This method is explicity declared to keep the workflow designer plugin happy. It's not clear why it can't use the variadic form, maybe it didn't exist in the older API version against which it compiles. The same could be true of other plugins that depend (wrongly) upon jira-core.
      Type Parameters:
      T - the type of component
      Parameters:
      type - the type of component
      Returns:
      the created component
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getInstance

      public static JiraComponentFactory getInstance()