Save This Page
Home » spring-framework-2.5.6-with-dependencies » org.springframework » beans » factory » support » [javadoc | source]
org.springframework.beans.factory.support
class: BeanDefinitionValueResolver [javadoc | source]
java.lang.Object
   org.springframework.beans.factory.support.BeanDefinitionValueResolver
Helper class for use in bean factory implementations, resolving values contained in bean definition objects into the actual values applied to the target bean instance.

Operates on an AbstractBeanFactory and a plain org.springframework.beans.factory.config.BeanDefinition object. Used by AbstractAutowireCapableBeanFactory .

Constructor:
 public BeanDefinitionValueResolver(AbstractBeanFactory beanFactory,
    String beanName,
    BeanDefinition beanDefinition,
    TypeConverter typeConverter) 
    Create a 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
    typeConverter - the TypeConverter to use for resolving TypedStringValues
Method from org.springframework.beans.factory.support.BeanDefinitionValueResolver Summary:
resolveTargetType,   resolveValueIfNecessary
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.beans.factory.support.BeanDefinitionValueResolver Detail:
 protected Class resolveTargetType(TypedStringValue value) throws ClassNotFoundException 
    Resolve the target type in the given TypedStringValue.
 public Object resolveValueIfNecessary(Object argName,
    Object value) 
    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.