commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: DynaBeans/PropertyDescriptor
Date Thu, 25 Sep 2003 16:13:46 GMT
Rafael Muñoz Vega wrote:

> Hi, all.
> I'm working in a application and i want to use DynaBeans and 
> Introspection.
> The current PropertyUtils not support DynaBeans in all the 
> *PropertyDescriptors
> methods (full of FIXME tags there :) ). I read a old thread 
> ( 
> in the dev-list about fixing it in the 1.1 version but it's seems that 
> nobody do it. What's the status? Anyone have a pacht not released or 
> anything?
> Thanks.
Although DynaBean properties don't show up in the property descriptors 
returned by PropertyUtils, such beans themselves are fully functional 
with the PropertyUtils getter and setter methods, as well as things like 
copyProperties().  Same thing goes for the BeanUtils methods that do the 
automatic type conversions for you as well.

My personal opinion is that it isn't worth the effort of trying to 
create fake descriptors, because there is no easy way to populate the 
readMethod and writeMethod properties -- a PropertyDescriptor assumes 
that each property on a bean has a getter method that takes no args, and 
a setter method that just takes a value, while DynaBeans do not have 
such things.

To introspect an object that you know is a DynaBean, call  
getDynaClass().getDynaProperties() instead and you'll get an array of 
DynaProperty objects, which is the DynaBeans version of property 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message