org.springframework.beans.factory.support
Interface BeanDefinitionReader

All Known Implementing Classes:
AbstractBeanDefinitionReader

public interface BeanDefinitionReader

Simple interface for bean definition readers. Specifies a load method with a Resource parameter.

Concrete bean definition readers can of course add additional load and register methods for bean definitions, specific to their bean definition format.

Since:
1.1
Author:
Juergen Hoeller
See Also:
Resource

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.
 int loadBeanDefinitions(Resource resource)
          Load bean definitions from the specified resource.
 

Method Detail

getBeanFactory

public BeanDefinitionRegistry getBeanFactory()
Return the bean factory to register the bean definitions with.


getBeanClassLoader

public ClassLoader getBeanClassLoader()
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.


loadBeanDefinitions

public int loadBeanDefinitions(Resource resource)
                        throws BeansException
Load bean definitions from the specified resource.

Parameters:
resource - the resource descriptor
Returns:
the number of bean definitions found
Throws:
BeansException - in case of loading or parsing errors


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