You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Matt Benson <gu...@yahoo.com> on 2006/02/16 23:55:07 UTC

[beanutils] getPropertyDescriptor(s)

Hi all,
what are the primary reasons why DynaBean support has
not yet been implemented for these PropertyUtils
methods in beanutils?  I assume there are some
concerns involved in how to implement this... what are
they?

Thanks,
Matt

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [beanutils] getPropertyDescriptor(s)

Posted by Matt Benson <gu...@yahoo.com>.
--- Craig McClanahan <cr...@apache.org> wrote:

>  2/16/06, Matt Benson <gu...@yahoo.com> wrote:
> > Craig:  thanks for your quick reply.  My (possibly
> > naive) impression was that you would specify
> > DynaBean's get(String) and set(String, Object)
> > methods... :)  Now, tell me why that won't work as
> > expected.  ;)
> 
> 
> Because a tool like Java Studio Creator (my day job
> is architect for this)
> is going to assume that these methods conform to the
> JavaBeans design
> patterns for properties ... a getter that takes zero
> arguments, and a setter
> that takes one argument (the value).  Trying to use
> these methods will cause
> the tool's reflective get or set call to fail
> because the argument types and
> counts won't match.

Doh!  Plain as can be.  I tend to ignore these little
rules regarding settors/gettors on beans, and here's
the proof.  So instantly what was simple becomes
extremely complex!  :)  Ouch.  Can't think of any
slick way around that off the top of my head... and I
assume I'm not the first, then.

Thanks,
Matt

> 
> -Matt
> 
> 
> Craig
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [beanutils] getPropertyDescriptor(s)

Posted by Craig McClanahan <cr...@apache.org>.
 2/16/06, Matt Benson <gu...@yahoo.com> wrote:
>
> --- Craig McClanahan <cr...@apache.org> wrote:
>
> > On 2/16/06, Matt Benson <gu...@yahoo.com>
> > wrote:
> > >
> > > Hi all,
> > > what are the primary reasons why DynaBean support
> > has
> > > not yet been implemented for these PropertyUtils
> > > methods in beanutils?  I assume there are some
> > > concerns involved in how to implement this... what
> > are
> > > they?
> >
> >
> > Although it's also due to lack of time on the part
> > of developers :-), there
> > is indeed a technical issue.  What do you specify
> > for the readMethod and
> > writeMethod properties?  Tools that use property
> > descriptors are going to
> > assume that these map to real methods that can be
> > used to get and set the
> > property values via reflection, but there are
> > (obviously) no methods with
> > the correct method signatures on the DynaBean base
> > class itself.
> >
>
> Craig:  thanks for your quick reply.  My (possibly
> naive) impression was that you would specify
> DynaBean's get(String) and set(String, Object)
> methods... :)  Now, tell me why that won't work as
> expected.  ;)


Because a tool like Java Studio Creator (my day job is architect for this)
is going to assume that these methods conform to the JavaBeans design
patterns for properties ... a getter that takes zero arguments, and a setter
that takes one argument (the value).  Trying to use these methods will cause
the tool's reflective get or set call to fail because the argument types and
counts won't match.

-Matt


Craig

Re: [beanutils] getPropertyDescriptor(s)

Posted by Matt Benson <gu...@yahoo.com>.
--- Craig McClanahan <cr...@apache.org> wrote:

> On 2/16/06, Matt Benson <gu...@yahoo.com>
> wrote:
> >
> > Hi all,
> > what are the primary reasons why DynaBean support
> has
> > not yet been implemented for these PropertyUtils
> > methods in beanutils?  I assume there are some
> > concerns involved in how to implement this... what
> are
> > they?
> 
> 
> Although it's also due to lack of time on the part
> of developers :-), there
> is indeed a technical issue.  What do you specify
> for the readMethod and
> writeMethod properties?  Tools that use property
> descriptors are going to
> assume that these map to real methods that can be
> used to get and set the
> property values via reflection, but there are
> (obviously) no methods with
> the correct method signatures on the DynaBean base
> class itself.
> 

Craig:  thanks for your quick reply.  My (possibly
naive) impression was that you would specify
DynaBean's get(String) and set(String, Object)
methods... :)  Now, tell me why that won't work as
expected.  ;)

-Matt

> Thanks,
> > Matt
> 
> 
> Craig


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [beanutils] getPropertyDescriptor(s)

Posted by Craig McClanahan <cr...@apache.org>.
On 2/16/06, Matt Benson <gu...@yahoo.com> wrote:
>
> Hi all,
> what are the primary reasons why DynaBean support has
> not yet been implemented for these PropertyUtils
> methods in beanutils?  I assume there are some
> concerns involved in how to implement this... what are
> they?


Although it's also due to lack of time on the part of developers :-), there
is indeed a technical issue.  What do you specify for the readMethod and
writeMethod properties?  Tools that use property descriptors are going to
assume that these map to real methods that can be used to get and set the
property values via reflection, but there are (obviously) no methods with
the correct method signatures on the DynaBean base class itself.

Thanks,
> Matt


Craig

__________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>