public class

SortedResourcesFactoryBean

extends AbstractFactoryBean<T>
implements ResourceLoaderAware
java.lang.Object
   ↳ org.springframework.beans.factory.config.AbstractFactoryBean<T>
     ↳ org.springframework.jdbc.config.SortedResourcesFactoryBean

Class Overview

FactoryBean implementation that takes a list of location Strings and creates a sorted array of Resource instances.

Summary

[Expand]
Inherited Fields
From class org.springframework.beans.factory.config.AbstractFactoryBean
Public Constructors
SortedResourcesFactoryBean(List<String> locations)
SortedResourcesFactoryBean(ResourceLoader resourceLoader, List<String> locations)
Public Methods
Class<? extends Resource[]> getObjectType()
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.
Protected Methods
Resource[] createInstance()
Template method that subclasses must override to construct the object returned by this factory.
[Expand]
Inherited Methods
From class org.springframework.beans.factory.config.AbstractFactoryBean
From class java.lang.Object
From interface org.springframework.beans.factory.BeanClassLoaderAware
From interface org.springframework.beans.factory.BeanFactoryAware
From interface org.springframework.beans.factory.DisposableBean
From interface org.springframework.beans.factory.FactoryBean
From interface org.springframework.beans.factory.InitializingBean
From interface org.springframework.context.ResourceLoaderAware

Public Constructors

public SortedResourcesFactoryBean (List<String> locations)

public SortedResourcesFactoryBean (ResourceLoader resourceLoader, List<String> locations)

Public Methods

public Class<? extends Resource[]> getObjectType ()

This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.

Returns
  • the type of object that this FactoryBean creates, or null if not known at the time of the call

public void setResourceLoader (ResourceLoader resourceLoader)

Set the ResourceLoader that this object runs in.

This might be a ResourcePatternResolver, which can be checked through instanceof ResourcePatternResolver. See also the ResourcePatternUtils.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's setApplicationContext.

Parameters
resourceLoader ResourceLoader object to be used by this object

Protected Methods

protected Resource[] createInstance ()

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 getObject() call.

Returns
  • the object returned by this factory
Throws
Exception