org.springframework.beans.factory.support
Class AbstractBeanDefinitionReader

java.lang.Object
  extended byorg.springframework.beans.factory.support.AbstractBeanDefinitionReader
All Implemented Interfaces:
BeanDefinitionReader
Direct Known Subclasses:
PropertiesBeanDefinitionReader, XmlBeanDefinitionReader

public abstract class AbstractBeanDefinitionReader
extends Object
implements BeanDefinitionReader

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.

Since:
11.12.2003
Author:
Juergen Hoeller
See Also:
BeanDefinitionReaderUtils

Field Summary
protected  Log logger
           
 
Constructor Summary
protected AbstractBeanDefinitionReader(BeanDefinitionRegistry beanFactory)
          Create a new AbstractBeanDefinitionReader for the given factory.
 
Method Summary
 ClassLoader getBeanClassLoader()
          Return the class loader to use for bean classes.
 BeanDefinitionRegistry getBeanFactory()
          Return the bean factory to register the bean definitions with.
 void setBeanClassLoader(ClassLoader beanClassLoader)
          Set the class loader to use for bean classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.beans.factory.support.BeanDefinitionReader
loadBeanDefinitions
 

Field Detail

logger

protected final Log logger
Constructor Detail

AbstractBeanDefinitionReader

protected AbstractBeanDefinitionReader(BeanDefinitionRegistry beanFactory)
Create a new AbstractBeanDefinitionReader for the given factory.

Parameters:
beanFactory - the bean factory to work on
Method Detail

getBeanFactory

public BeanDefinitionRegistry getBeanFactory()
Description copied from interface: BeanDefinitionReader
Return the bean factory to register the bean definitions with.

Specified by:
getBeanFactory in interface BeanDefinitionReader

setBeanClassLoader

public void setBeanClassLoader(ClassLoader beanClassLoader)
Set the class loader to use for bean classes. Default is the thread context class loader.

Setting this to null suggests to not load bean classes but just register bean definitions with class names, for example when just registering beans in a registry but not actually instantiating them in a factory.

See Also:
Thread.getContextClassLoader()

getBeanClassLoader

public ClassLoader getBeanClassLoader()
Description copied from interface: BeanDefinitionReader
Return the class loader to use for bean classes.

Null suggests to not load bean classes but just register bean definitions with class names, for example when just registering beans in a registry but not actually instantiating them in a factory.

Specified by:
getBeanClassLoader in interface BeanDefinitionReader


Copyright (C) 2003-2004 The Spring Framework Project.