Oliver Heger created BEANUTILS-428:
--------------------------------------

             Summary: Provide a BeanIntrospector implementation which supports 
properties in a fluent API
                 Key: BEANUTILS-428
                 URL: https://issues.apache.org/jira/browse/BEANUTILS-428
             Project: Commons BeanUtils
          Issue Type: Improvement
          Components: Bean / Property Utils
    Affects Versions: 1.8.3
            Reporter: Oliver Heger
            Assignee: Oliver Heger


BEANUTILS-425 was about adding a mechanism for customizing bean introspection. 
This ticket is a request for a concrete new {{BeanIntrospector}} implementation 
which detects writable bean properties even if the return value of the set 
method is not *void*.

The _builder_ pattern and fluent API definitions become more and more popular. 
Here methods are offered for setting properties that return the current 
instance of a builder object for method chaining, for instance:

{code}
public class FooBuilder {
    public FooBuilder setFooProperty1(String value) {
        ...
        return this;
    }

    public FooBuilder setFooProperty2(int value) {
        ...
        return this;
    }
}
{code}

Standard bean introspection will not recognize set methods like that because 
they do not conform to the Java Beans specification. A new {{BeanIntrospector}} 
implementation can be created which ignores the return type of set methods and 
create corresponding {{PropertyDescriptor}} objects with a correct write method.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to