Class BeanDefinitionVisitor
java.lang.Object
org.springframework.beans.factory.config.BeanDefinitionVisitor
Visitor class for traversing
BeanDefinition objects, in particular
the property values and constructor argument values contained in them,
resolving bean metadata values.
Used by PlaceholderConfigurerSupport to parse all String values
contained in a BeanDefinition, resolving any placeholders found.
- Since:
- 1.2
- Author:
- Juergen Hoeller, Sam Brannen
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate a new BeanDefinitionVisitor for subclassing.BeanDefinitionVisitor(StringValueResolver valueResolver) Create a new BeanDefinitionVisitor, applying the specified value resolver to all bean metadata values. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringresolveStringValue(String strVal) Resolve the given String value, for example parsing placeholders.protected ObjectresolveValue(Object value) protected voidvisitArray(Object[] arrayVal) protected voidvisitBeanClassName(BeanDefinition beanDefinition) voidvisitBeanDefinition(BeanDefinition beanDefinition) Traverse the given BeanDefinition object and the MutablePropertyValues and ConstructorArgumentValues contained in them.protected voidvisitFactoryBeanName(BeanDefinition beanDefinition) protected voidvisitFactoryMethodName(BeanDefinition beanDefinition) protected voidprotected voidprotected voidprotected voidprotected voidvisitParentName(BeanDefinition beanDefinition) protected voidprotected voidvisitScope(BeanDefinition beanDefinition) protected void
-
Constructor Details
-
BeanDefinitionVisitor
Create a new BeanDefinitionVisitor, applying the specified value resolver to all bean metadata values.- Parameters:
valueResolver- the StringValueResolver to apply
-
BeanDefinitionVisitor
protected BeanDefinitionVisitor()Create a new BeanDefinitionVisitor for subclassing. Subclasses need to override theresolveStringValue(java.lang.String)method.
-
-
Method Details
-
visitBeanDefinition
Traverse the given BeanDefinition object and the MutablePropertyValues and ConstructorArgumentValues contained in them.- Parameters:
beanDefinition- the BeanDefinition object to traverse- See Also:
-
visitParentName
-
visitBeanClassName
-
visitFactoryBeanName
-
visitFactoryMethodName
-
visitScope
-
visitPropertyValues
-
visitIndexedArgumentValues
-
visitGenericArgumentValues
-
resolveValue
-
visitArray
-
visitList
-
visitSet
-
visitMap
-
resolveStringValue
Resolve the given String value, for example parsing placeholders.- Parameters:
strVal- the original String value- Returns:
- the resolved String value
-