Package: org.grails.core.io.support

## [Groovy] Class GrailsFactoriesLoader

- org.grails.core.io.support.GrailsFactoriesLoader

-     @groovy.transform.CompileStatic
      class GrailsFactoriesLoader
      extends FactoriesLoaderSupport

  General purpose factory loading mechanism for internal use within the framework.

  Based on org.springframework.core.io.support.SpringFactoriesLoader, but applies caching and uses a different file name

  Since:
    2.4
  Authors:
    Graeme Rocher

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private static java.lang.Object[]` | `NO_ARGUMENTS` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class FactoriesLoaderSupport` | `FACTORIES_RESOURCE_LOCATION, loadedPropertiesForClassLoader`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GrailsFactoriesLoader ()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `<T>` | `static java.util.List<T>` | `loadFactories(java.lang.Class<T> factoryClass)` Load the factory implementations of the given type from the default location, using the given class loader.
    `<T>` | `static java.util.List<T>` | `loadFactories(java.lang.Class<T> factoryClass, java.lang.ClassLoader classLoader)` Load the factory implementations of the given type from the default location, using the given class loader.
    `<T>` | `static java.util.List<T>` | `loadFactoriesWithArguments(java.lang.Class<T> factoryClass, java.lang.ClassLoader classLoader, java.lang.Object[] arguments)`
    `<T>` | `static T` | `loadFactory(java.lang.Class<T> factoryClass, java.lang.ClassLoader classLoader)`
    `<T>` | `static T` | `loadFactory(java.lang.Class<T> factoryClass, java.lang.Object[] arguments)`
    `<T>` | `static T` | `loadFactory(java.lang.Class<T> factoryClass, java.lang.ClassLoader classLoader, java.lang.Object[] arguments)`
    `<T>` | `private static java.lang.Class<? extends T>` | `loadFactoryClass(java.lang.String instanceClassName, java.lang.Class<T> factoryClass, java.lang.ClassLoader classLoader)`
    `<T>` | `static java.util.List<java.lang.Class<T>>` | `loadFactoryClasses(java.lang.Class<T> factoryClass, java.lang.ClassLoader classLoader)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class FactoriesLoaderSupport` | `loadFactoryNames, loadFactoryNames`

- - ### Field Detail

    - #### private static final java.lang.Object[] NO_ARGUMENTS

  - ### Constructor Detail

    - #### GrailsFactoriesLoader()

  - ### Method Detail

    - #### <T> static java.util.List<T> loadFactories(java.lang.Class<T> factoryClass)

      Load the factory implementations of the given type from the default location, using the given class loader.

      The returned factories are ordered in accordance with the org.springframework.core.OrderComparator.

      Parameters:
        `factoryClass` - the interface or abstract class representing the factory

    - #### <T> static java.util.List<T> loadFactories(java.lang.Class<T> factoryClass, java.lang.ClassLoader classLoader)

      Load the factory implementations of the given type from the default location, using the given class loader.

      The returned factories are ordered in accordance with the org.springframework.core.OrderComparator.

      Parameters:
        `factoryClass` - the interface or abstract class representing the factory
        `classLoader` - the ClassLoader to use for loading (can be `null` to use the default)

    - #### <T> static java.util.List<T> loadFactoriesWithArguments(java.lang.Class<T> factoryClass, java.lang.ClassLoader classLoader, java.lang.Object[] arguments)

    - #### <T> static T loadFactory(java.lang.Class<T> factoryClass, java.lang.ClassLoader classLoader)

    - #### <T> static T loadFactory(java.lang.Class<T> factoryClass, java.lang.Object[] arguments)

    - #### <T> static T loadFactory(java.lang.Class<T> factoryClass, java.lang.ClassLoader classLoader, java.lang.Object[] arguments)

    - #### <T> private static java.lang.Class<? extends T> loadFactoryClass(java.lang.String instanceClassName, java.lang.Class<T> factoryClass, java.lang.ClassLoader classLoader)

    - #### <T> static java.util.List<java.lang.Class<T>> loadFactoryClasses(java.lang.Class<T> factoryClass, java.lang.ClassLoader classLoader)