commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guijt, Bart (fin)" <Bart.Gu...@ordina.nl>
Subject RE: [BeanUtils] Having a mapped property and indexed property wit h th e same name
Date Thu, 14 Feb 2002 09:34:20 GMT
> From: 	Craig R. McClanahan[SMTP:craigmcc@apache.org]
> On Thu, 14 Feb 2002, Guijt, Bart (fin) wrote:
> 
> >
> > My question is: Is this the intended behaviour? My property is both
> mapped
> > and indexed, and using method overloading to support this seems to be
> the
> > right way to do it.
> >
> 
> Unfortunately, having overloaded property getters or setters violates the
> JavaBeans spec.  I would suggest changing the name of one or the other
> getter to something unique.
> 
I did that, as a workaround to this particular 'overloading' problem.
However, I just downloaded and read the spec
(http://java.sun.com/products/javabeans/docs/beans.101.pdf) and the Design
Patterns chapter (8.3) does *not* mention the overloading violation, it only
mentions the patterns expected when using certain types of properties
(simple, collections and indexed). Since Mapped properties are an invention
of the BeanUtils package, I suggest we support them using overloading ;-)

> > - Bart Guijt
> >
> 
> Craig McClanahan
> 
Bart Guijt

--
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