@CompileStatic class GrailsFactoriesLoader extends FactoriesLoaderSupport
General purpose factory loading mechanism for internal use within the framework.
Based on SpringFactoriesLoader, but applies caching and uses a different file name
| Properties inherited from class | Properties |
|---|---|
class FactoriesLoaderSupport |
FACTORIES_RESOURCE_LOCATION |
| Constructor and description |
|---|
GrailsFactoriesLoader() |
| Type Params | Return Type | Name and description |
|---|---|---|
<T> |
static List<T> |
loadFactories(Class<T> factoryClass)Load the factory implementations of the given type from the default location, using the given class loader. |
<T> |
static List<T> |
loadFactories(Class<T> factoryClass, ClassLoader classLoader)Load the factory implementations of the given type from the default location, using the given class loader. |
<T> |
static List<T> |
loadFactoriesWithArguments(Class<T> factoryClass, ClassLoader classLoader, Object[] arguments) |
<T> |
static T |
loadFactory(Class<T> factoryClass, ClassLoader classLoader) |
<T> |
static T |
loadFactory(Class<T> factoryClass, Object[] arguments) |
<T> |
static T |
loadFactory(Class<T> factoryClass, ClassLoader classLoader, Object[] arguments) |
<T> |
static List<Class<T>> |
loadFactoryClasses(Class<T> factoryClass, ClassLoader classLoader) |
| Methods inherited from class | Name |
|---|---|
class FactoriesLoaderSupport |
loadFactoryNames, loadFactoryNames |
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 OrderComparator.
factoryClass - the interface or abstract class representing the factoryLoad 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 OrderComparator.
factoryClass - the interface or abstract class representing the factoryclassLoader - the ClassLoader to use for loading (can be null to use the default)