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
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionSortedResourcesFactoryBean(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.voidsetResourceLoader(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:ResourceLoaderAwareSet the ResourceLoader that this object runs in.This might be a ResourcePatternResolver, which can be checked through
instanceof ResourcePatternResolver. See also theResourcePatternUtils.getResourcePatternResolvermethod.Invoked after population of normal bean properties but before an init callback like InitializingBean's
afterPropertiesSetor a custom init-method. Invoked before ApplicationContextAware'ssetApplicationContext.- Specified by:
setResourceLoaderin interfaceResourceLoaderAware- Parameters:
resourceLoader- the ResourceLoader object to be used by this object- See Also:
-
getObjectType
Description copied from class:AbstractFactoryBeanThis abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.- Specified by:
getObjectTypein interfaceFactoryBean<Resource[]>- Specified by:
getObjectTypein classAbstractFactoryBean<Resource[]>- Returns:
- the type of object that this FactoryBean creates,
or
nullif not known at the time of the call - See Also:
-
createInstance
Description copied from class:AbstractFactoryBeanTemplate 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:
createInstancein classAbstractFactoryBean<Resource[]>- Returns:
- the object returned by this factory
- Throws:
Exception- if an exception occurred during object creation- See Also:
-