Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » beans » factory » support » [javadoc | source]
org.springframework.beans.factory.support
abstract public class: AbstractBeanDefinitionReader [javadoc | source]
java.lang.Object
   org.springframework.beans.factory.support.AbstractBeanDefinitionReader

All Implemented Interfaces:
    BeanDefinitionReader

Direct Known Subclasses:
    XmlBeanDefinitionReader, PropertiesBeanDefinitionReader

Abstract base class for bean definition readers which implement the BeanDefinitionReader interface.

Provides common properties like the bean factory to work on and the class loader to use for loading bean classes.

Field Summary
protected final  Log logger    Logger available to subclasses 
Constructor:
 protected AbstractBeanDefinitionReader(BeanDefinitionRegistry registry) 
    Parameters:
    registry - the BeanFactory to load bean definitions into, in the form of a BeanDefinitionRegistry
    Also see:
    setResourceLoader
Method from org.springframework.beans.factory.support.AbstractBeanDefinitionReader Summary:
getBeanClassLoader,   getBeanFactory,   getBeanNameGenerator,   getRegistry,   getResourceLoader,   loadBeanDefinitions,   loadBeanDefinitions,   loadBeanDefinitions,   loadBeanDefinitions,   setBeanClassLoader,   setBeanNameGenerator,   setResourceLoader
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.beans.factory.support.AbstractBeanDefinitionReader Detail:
 public ClassLoader getBeanClassLoader() 
 public final BeanDefinitionRegistry getBeanFactory() 
 public BeanNameGenerator getBeanNameGenerator() 
 public final BeanDefinitionRegistry getRegistry() 
 public ResourceLoader getResourceLoader() 
 public int loadBeanDefinitions(Resource[] resources) throws BeanDefinitionStoreException 
 public int loadBeanDefinitions(String location) throws BeanDefinitionStoreException 
 public int loadBeanDefinitions(String[] locations) throws BeanDefinitionStoreException 
 public int loadBeanDefinitions(String location,
    Set actualResources) throws BeanDefinitionStoreException 
    Load bean definitions from the specified resource location.

    The location can also be a location pattern, provided that the ResourceLoader of this bean definition reader is a ResourcePatternResolver.

 public  void setBeanClassLoader(ClassLoader beanClassLoader) 
    Set the ClassLoader to use for bean classes.

    Default is null, which suggests to not load bean classes eagerly but rather to just register bean definitions with class names, with the corresponding Classes to be resolved later (or never).

 public  void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) 
    Set the BeanNameGenerator to use for anonymous beans (without explicit bean name specified).

    Default is a DefaultBeanNameGenerator .

 public  void setResourceLoader(ResourceLoader resourceLoader) 
    Set the ResourceLoader to use for resource locations. If specifying a ResourcePatternResolver, the bean definition reader will be capable of resolving resource patterns to Resource arrays.

    Default is PathMatchingResourcePatternResolver, also capable of resource pattern resolving through the ResourcePatternResolver interface.

    Setting this to null suggests that absolute resource loading is not available for this bean definition reader.