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-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org