commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: [BeanUtils] Mapped properties, this maybe a bug?
Date Mon, 20 Oct 2003 21:16:20 GMT
Anthony.Mutiso@aeso.ca wrote:

>Thanks David for the response.
>
>I guess then the real questions is why is the silent read-only assumption
>the default behavior? Or why not keep looking for setters even after the
>first one that comes up does not match the expected signature?
>
>If the non-polymorphic behavior is required rather then convenient, then of
>you have other conflicting signatures, maybe a log4j warning to save other
>poor souls from hours of debugging?
>
>Not that I require this at present, but I could see a situation where a
>property has both mapped and scalar behavior especially in an index world,
>ala prop(Name) and prop.config.address.
>
>  
>

The approach for mapped properties was copied from the way that 
JavaBeans works for scalar and indexed properties.  None of them 
supports the type of name polymorphism you are describing, and lots of 
code that talks about "JavaBeans" assumes that you know this kind of the 
rule already, because it is so universal.

To know precisely what a JavaBean is, the simplest thing to do is skim 
the JavaBeans specification.  For the question at hand, you'll want to 
study the chapter on properties pretty carefully.

http://java.sun.com/products/javabeans/

Craig



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


Mime
View raw message