站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 1.2.9 API 文档英文版

BeanDefinitionValueResolver (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.beans.factory.support
Class BeanDefinitionValueResolver

java.lang.Object
  extended by org.springframework.beans.factory.support.BeanDefinitionValueResolver

public class BeanDefinitionValueResolver
extends Object

Helper class for use by BeanFactory implementations, resolving values contained in BeanDefinition objects into the actual values applied to th target bean instance.

Operates on an AbstractBeanFactory and a plain BeanDefinition object. Used by AbstractAutowireCapableBeanFactory.

Since:
1.2
Author:
Juergen Hoeller
See Also:
AbstractAutowireCapableBeanFactory

Field Summary
protected static Log logger
           
 
Constructor Summary
BeanDefinitionValueResolver(AbstractBeanFactory beanFactory, String beanName, BeanDefinition beanDefinition)
          Create a new BeanDefinitionValueResolver for the given BeanFactory and BeanDefinition.
 
Method Summary
 Object resolveValueIfNecessary(String argName, Object value)
          Given a PropertyValue, return a value, resolving any references to other beans in the factory if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final Log logger
Constructor Detail

BeanDefinitionValueResolver

public BeanDefinitionValueResolver(AbstractBeanFactory beanFactory,
                                   String beanName,
                                   BeanDefinition beanDefinition)
Create a new BeanDefinitionValueResolver for the given BeanFactory and BeanDefinition.

Parameters:
beanFactory - the BeanFactory to resolve against
beanName - the name of the bean that we work on
beanDefinition - the BeanDefinition of the bean that we work on
Method Detail

resolveValueIfNecessary

public Object resolveValueIfNecessary(String argName,
                                      Object value)
                               throws BeansException
Given a PropertyValue, return a value, resolving any references to other beans in the factory if necessary. The value could be:
  • A BeanDefinition, which leads to the creation of a corresponding new bean instance. Singleton flags and names of such "inner beans" are always ignored: Inner beans are anonymous prototypes.
  • A RuntimeBeanReference, which must be resolved.
  • A ManagedList. This is a special collection that may contain RuntimeBeanReferences or Collections that will need to be resolved.
  • A ManagedSet. May also contain RuntimeBeanReferences or Collections that will need to be resolved.
  • A ManagedMap. In this case the value may be a RuntimeBeanReference or Collection that will need to be resolved.
  • An ordinary object or null, in which case it's left alone.

    Throws:
    BeansException


  • Copyright (c) 2002-2007 The Spring Framework Project.