open class SimpleConstructorNamespaceHandler : NamespaceHandler
Simple NamespaceHandler implementation that maps custom attributes directly through to bean properties. An important point to note is that this NamespaceHandler does not have a corresponding schema since there is no way to know in advance all possible attribute names.
An example of the usage of this NamespaceHandler is shown below:
<bean id="author" class="..TestBean" c:name="Enescu" c:work-ref="compositions"/> Here the 'c:name' corresponds directly to the 'name ' argument declared on the constructor of class 'TestBean'. The 'c:work-ref' attributes corresponds to the 'work' argument and, rather than being the concrete value, it contains the name of the bean that will be considered as a parameter. Note: This implementation supports only named parameters - there is no support for indexes or types. Further more, the names are used as hints by the container which, by default, does type introspection.
Author
Costin Leau
Since
3.1
See Also
SimplePropertyNamespaceHandler
SimpleConstructorNamespaceHandler()
Simple An example of the usage of this Here the 'c:name' corresponds directly to the 'name ' argument declared on the constructor of class 'TestBean'. The 'c:work-ref' attributes corresponds to the 'work' argument and, rather than being the concrete value, it contains the name of the bean that will be considered as a parameter. Note: This implementation supports only named parameters - there is no support for indexes or types. Further more, the names are used as hints by the container which, by default, does type introspection.
|
open fun decorate(node: Node, definition: BeanDefinitionHolder, parserContext: ParserContext): BeanDefinitionHolder |
|
open fun init(): Unit |
|
open fun parse(element: Element, parserContext: ParserContext): BeanDefinition |