commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: [BeanUtils] About DynaProperty definition
Date Mon, 25 Aug 2003 21:16:41 GMT
On Friday, August 22, 2003, at 01:05 PM, Alfonso da Silva wrote:

> Hi!

hi Alfonso

> I have two doubts:
> 1) The present implementation of DynaProperty allows Maps with keys of
> any class. However, the deficiĆ³n of DynaBean only allows String keys.
> I believe that he is better to modify DynaProperty to adapt it, although
> also exists the possibility of extending the DynaBean interface with:
>  -java.lang.Object get(java.lang.String name, java.lang.Object key)
>  -void set(java.lang.String name, java.lang.Object key, java.lang.Object 
> value)
> But it can cause many problems of compatibility!!!!
> If everything is ok, I will modify DynaProperty (and I will generate diff 
> ;) ).

you're correct that the DynaBean interface only allows stringy keys. since 
it's an interface it'll have to start that way (it cannot be modified 
without breaking compatibility).

i think it's probably ok to (quickly) remove the key type (at least, i 
think that this is what you're suggesting) unless anyone else can think of 
a reason why it might be useful.

> 2) It would be necessary to modify BasicDynaBean to use the new
> functionalities of DynaProperty (if they are implemented, because they
> are optional) or is better to create another implementation of Dynabean
> that uses them?

i'm not how you propose to adapt this class to support this feature. if 
you feel like contributing a patch i'll understand a little better and be 
able to determine whether it's better to create new classes or patch old.

- robert

View raw message