@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
Constructor and description |
---|
GrailsFactoriesLoader
() |
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> |
static java.util.List<java.lang.Class<T>> |
loadFactoryClasses(java.lang.Class<T> factoryClass, java.lang.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 org.springframework.core.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 org.springframework.core.OrderComparator.
factoryClass
- the interface or abstract class representing the factoryclassLoader
- the ClassLoader to use for loading (can be null
to use the default)