Package org.springframework.jdbc.config
Class SortedResourcesFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<Resource[]>
org.springframework.jdbc.config.SortedResourcesFactoryBean
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<Resource[]>
,InitializingBean
,ResourceLoaderAware
public class SortedResourcesFactoryBean
extends AbstractFactoryBean<Resource[]>
implements ResourceLoaderAware
FactoryBean
implementation that takes a list of location Strings
and creates a sorted array of Resource
instances.- Since:
- 3.0
- Author:
- Dave Syer, Juergen Hoeller, Christian Dupuis
-
Field Summary
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
ConstructorDescriptionSortedResourcesFactoryBean
(List<String> locations) SortedResourcesFactoryBean
(ResourceLoader resourceLoader, List<String> locations) -
Method Summary
Modifier and TypeMethodDescriptionprotected Resource[]
Template method that subclasses must override to construct the object returned by this factory.This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.void
setResourceLoader
(ResourceLoader resourceLoader) Set the ResourceLoader that this object runs in.Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
SortedResourcesFactoryBean
-
SortedResourcesFactoryBean
-
-
Method Details
-
setResourceLoader
Description copied from interface:ResourceLoaderAware
Set the ResourceLoader that this object runs in.This might be a ResourcePatternResolver, which can be checked through
instanceof ResourcePatternResolver
. See also theResourcePatternUtils.getResourcePatternResolver
method.Invoked after population of normal bean properties but before an init callback like InitializingBean's
afterPropertiesSet
or a custom init-method. Invoked before ApplicationContextAware'ssetApplicationContext
.- Specified by:
setResourceLoader
in interfaceResourceLoaderAware
- Parameters:
resourceLoader
- the ResourceLoader object to be used by this object- See Also:
-
getObjectType
Description copied from class:AbstractFactoryBean
This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.- Specified by:
getObjectType
in interfaceFactoryBean<Resource[]>
- Specified by:
getObjectType
in classAbstractFactoryBean<Resource[]>
- Returns:
- the type of object that this FactoryBean creates,
or
null
if not known at the time of the call - See Also:
-
createInstance
Description copied from class:AbstractFactoryBean
Template method that subclasses must override to construct the object returned by this factory.Invoked on initialization of this FactoryBean in case of a singleton; else, on each
AbstractFactoryBean.getObject()
call.- Specified by:
createInstance
in classAbstractFactoryBean<Resource[]>
- Returns:
- the object returned by this factory
- Throws:
Exception
- if an exception occurred during object creation- See Also:
-