org.springframework.beans.factory.support
Class AbstractBeanDefinitionReader

Direct Known Subclasses:
PropertiesBeanDefinitionReader, XmlBeanDefinitionReader

public abstract class AbstractBeanDefinitionReader

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

Author:
Juergen Hoeller
Since: 11.12.2003

Method Summary
 ClassLoadergetBeanClassLoader()
          Return the class loader for bean classes.
 BeanDefinitionRegistrygetBeanFactory()
          Return the BeanFactory that this reader works on.
 voidsetBeanClassLoader(ClassLoader beanClassLoader)
          Set the class loader to use for bean classes.

Method Detail

getBeanClassLoader

public ClassLoader getBeanClassLoader()
Return the class loader for bean classes.

getBeanFactory

public BeanDefinitionRegistry getBeanFactory()
Return the BeanFactory that this reader works on.

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:
java.lang.Thread.getContextClassLoader()

Association Links

to Class org.springframework.beans.factory.support.BeanDefinitionRegistry

to Class java.lang.ClassLoader