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="rob" class="..TestBean" p:name="Rob Harrop" p:spouse-ref="sally"/>Here the '
p:name' corresponds directly to the 'name'
property on class 'TestBean'. The 'p:spouse-ref'
attributes corresponds to the 'spouse' property and, rather
than being the concrete value, it contains the name of the bean that will
be injected into that property.
| Modifier and Type | Field and Description |
|---|---|
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public BeanDefinitionHolder | decorate(Node
the source element or attribute that is to be parsed node, BeanDefinitionHolder the current bean definition definition, ParserContext the object encapsulating the current state of the parsing process parserContext)Implements org. Parse the specified |
| public void | init()
Implements org. Invoked by the |
| public BeanDefinition | parse(Element
the element that is to be parsed into one or more element, ParserContext BeanDefinitionsthe object encapsulating the current state of the parsing process parserContext)Implements org. Parse the specified |
| REF_SUFFIX | back to summary |
|---|---|
| private static final String REF_SUFFIX | |
| SimplePropertyNamespaceHandler | back to summary |
|---|---|
| public SimplePropertyNamespaceHandler() | |
| decorate | back to summary |
|---|---|
| public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) Implements org. Doc from org. Parse the specified The Implementations may choose to return a completely new definition,
which will replace the original definition in the resulting
The supplied
| |
| init | back to summary |
|---|---|
| public void init() Implements org. Doc from org. Invoked by the
| |
| parse | back to summary |
|---|---|
| public BeanDefinition parse(Element element, ParserContext parserContext) Implements org. Doc from org. Parse the specified Implementations should return the primary Implementations may return
| |