|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.beans.factory.support.AbstractBeanDefinitionReader
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.
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. |
ResourceLoader |
getResourceLoader()
Return the resource loader to use for resource locations. |
int |
loadBeanDefinitions(Resource[] resources)
Load bean definitions from the specified resources. |
void |
setBeanClassLoader(ClassLoader beanClassLoader)
Set the ClassLoader to use for bean classes. |
void |
setResourceLoader(ResourceLoader resourceLoader)
Set the ResourceLoader to use for resource locations. |
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 |
protected final Log logger
Constructor Detail |
protected AbstractBeanDefinitionReader(BeanDefinitionRegistry beanFactory)
beanFactory
- the bean factory to work onMethod Detail |
public BeanDefinitionRegistry getBeanFactory()
BeanDefinitionReader
getBeanFactory
in interface BeanDefinitionReader
public void setBeanClassLoader(ClassLoader beanClassLoader)
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.
Thread.getContextClassLoader()
public ClassLoader getBeanClassLoader()
BeanDefinitionReader
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.
getBeanClassLoader
in interface BeanDefinitionReader
public void setResourceLoader(ResourceLoader resourceLoader)
Can also be a ResourcePatternResolver, additionally capable of resolving resource patterns to Resource arrays.
Setting this to null suggests that absolute resource loading is not available for this bean definition reader.
DefaultResourceLoader
,
ResourcePatternResolver
public ResourceLoader getResourceLoader()
BeanDefinitionReader
Null suggests that absolute resource loading is not available for this bean definition reader.
This is mainly meant to be used for importing further resources from within a bean definition resource, for example via the "import" tag in XML bean definitions. It is recommended, however, to apply such imports relative to the defining resource; only explicit full resource locations will trigger absolute resource loading.
getResourceLoader
in interface BeanDefinitionReader
ResourcePatternResolver
public int loadBeanDefinitions(Resource[] resources) throws BeansException
BeanDefinitionReader
loadBeanDefinitions
in interface BeanDefinitionReader
resources
- the resource descriptors
BeansException
- in case of loading or parsing errors
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |