commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@eurobell.co.uk>
Subject Re: [BeanUtils] PropertyUtils and DynaBeans (getPropertyDescriptors)
Date Wed, 17 Apr 2002 19:35:36 GMT
> I did think a standard wrapper around the Introspector would be a good
idea
> ...
> Though I guess the static methods of PropertyUtils actually are this
wrapper.
> PropertyUtils.getPropertyDescriptors(bean);
> PropertyUtils.getMappedPropertyDescriptors(bean);

> Also DynaBeans right now can't support beans PropertyDescriptors,
presumably
> because its not possible to implement read & write Methods.

Hmm. The PropertyDescriptors for DynaBeans would indeed be pretty empty, so
I guess you are right.

> Though maybe another idea is to treat everything as a DynaBean.
> So maybe DyanBean could actually become the wrapper around the
introspector?
> This approach would then supports beans, DynaBeans, mapped properties and
so
> forth in a simple consistent manner.
> ...
> Also WrapDynaClass instances are cached so all in all the approach of
using
> DynaBeans all the time as a bean/Introspector replacement seems like a
good
> idea. So if you're not being typesafe, using DynaBeans seems like the way
to
> go. DynaBeans rock ;-)

Intriguing. Overall the realatively small DynaBean interface probably does
cover the requirements for getting and setting data from a 'bean'. There
doesn't seem to be any way to use the one.two[0].three(four) type syntax
however. Maybe this could be added.

Stephen


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message