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
ModifierConstructorDescriptionprotected
Create 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 String
resolveStringValue
(String strVal) Resolve the given String value, for example parsing placeholders.protected Object
resolveValue
(Object value) protected void
visitArray
(Object[] arrayVal) protected void
visitBeanClassName
(BeanDefinition beanDefinition) void
visitBeanDefinition
(BeanDefinition beanDefinition) Traverse the given BeanDefinition object and the MutablePropertyValues and ConstructorArgumentValues contained in them.protected void
visitFactoryBeanName
(BeanDefinition beanDefinition) protected void
visitFactoryMethodName
(BeanDefinition beanDefinition) protected void
protected void
protected void
protected void
protected void
visitParentName
(BeanDefinition beanDefinition) protected void
protected void
visitScope
(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
-