commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Ritter <benerit...@gmail.com>
Subject Re: [beanutils] Property access on a fluent API
Date Wed, 05 Dec 2012 22:13:59 GMT
Hi Oliver,

AFAIK beanutils is not restricted to pure JavaBeans. The project website
just says that the component provides simple wrappers around the java
refelct and introspect API. So I would say, that the functionality you
propsed would fit nicely into BU (maybe the scope has changed and now the
name is a bit misleading?!).

Regarding your question where to implement it: I did some work on beanutils
2, but there are several outstanding issues on JIRA that block me from
providing more patches. So development is a bit stuck until someone can
step in and review those issues and the patches attached to them.
After that, there are a some points to address before BU2 can be promoted
to proper and eventually be released [1].
So if you need that functionality quickly, it would probably be easier to
add it to BU1 and push out a release.

Regards,
Benedikt

[1] http://markmail.org/thread/5zgoyid5ld7otwsv


2012/12/5 Oliver Heger <oliver.heger@oliver-heger.de>

> Hi all,
>
> in [configuration] [beanutils] is used to initialize properties of Java
> objects defined in configuration files. This works fine as long as the
> objects conform to the Java Beans specification.
>
> Now I would like to initialize other objects, too, which implement a
> fluent interface as follows:
>
> class Param {
>     public Param setFoo(String value) {
>         ...
>     }
> }
>
> Such properties are not detected by [beanutils] with its standard
> mechanism. As a work-around, I currently provide specific BeanInfo classes
> for the affected Java objects I want to process. They use a mechanism which
> scans a class's methods and adds property descriptors for set methods even
> if they have a non-void return type.
>
> Because fluent APIs like that are becoming more and more popular I wonder
> whether it would be a good extension for [beanutils] to be more flexible
> when searching for property access methods. I guess, ultimately, I am
> asking for an extension point where a custom introspection mechanism can be
> plugged in so that client code is free to provide additional property
> descriptors for its data objects.
>
> Would there be interest to add such a feature to [beanutils]? For version
> 1.x or 2.0?
> Oliver
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org<dev-unsubscribe@commons.apache.org>
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message