类 SimpleConstructorNamespaceHandler

  • 所有已实现的接口:
    NamespaceHandler

    public class SimpleConstructorNamespaceHandler
    extends Object
    implements 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.
    从以下版本开始:
    3.1
    作者:
    Costin Leau
    另请参阅:
    SimplePropertyNamespaceHandler