Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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`

Constructor Summary
`SortedResourcesFactoryBean(java.util.List<java.lang.String> locations)`
`SortedResourcesFactoryBean(ResourceLoader resourceLoader, java.util.List<java.lang.String> locations)`

Method Summary
`protected Resource[]` | `createInstance()` Template method that subclasses must override to construct the object returned by this factory.
`java.lang.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.

Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
`afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SortedResourcesFactoryBean

    public SortedResourcesFactoryBean(java.util.List<java.lang.String> locations)

### SortedResourcesFactoryBean

    public SortedResourcesFactoryBean(ResourceLoader resourceLoader,
                                      java.util.List<java.lang.String> locations)

Method Detail

### setResourceLoader

    public void setResourceLoader(ResourceLoader resourceLoader)

  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 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`.

  Specified by:
    `setResourceLoader` in interface `ResourceLoaderAware`
  Parameters:
    `resourceLoader` - ResourceLoader object to be used by this object
  See Also:
    `ResourcePatternResolver`, `ResourcePatternUtils.getResourcePatternResolver(org.springframework.core.io.ResourceLoader)`

### getObjectType

    public java.lang.Class<? extends Resource[]> 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 interface `FactoryBean<Resource[]>`
  Specified by:
    `getObjectType` in class `AbstractFactoryBean<Resource[]>`
  Returns:
    the type of object that this FactoryBean creates, or `null` if not known at the time of the call
  See Also:
    `FactoryBean.getObjectType()`

### createInstance

    protected Resource[] createInstance()
                                 throws java.lang.Exception

  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 class `AbstractFactoryBean<Resource[]>`
  Returns:
    the object returned by this factory
  Throws:
    `java.lang.Exception` - if an exception occured during object creation
  See Also:
    `AbstractFactoryBean.getObject()`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD