commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <>
Subject Re: [BeanUtils] Handling array creation?
Date Wed, 07 Sep 2005 21:24:51 GMT
Thomas Dudziak wrote:
> So I take it that you either got a setter for this field, or you want
> to use reflection directly (Field object).

Right... IIRC, having a getter and setter for the entire array is in the 
javabean spec anyway, so that's certainly something I can expect of any 
class that is going to be dynamically created like this.  Even if it 
isn't in the spec, it certainly isn't too much to ask :)

> But why shouldn't that work ? I mean, in the end arrays are normal
> objects and can be used as such.
> Eg. you can do something like:


That code looks pretty much perfect to me... I was not aware that you 
could use setProperty() in that way, I've never seen it done before.  I 
don't think I even need to go the reflection route, the first example 
you posted I think will do the trick nicely.

> Does that answer your question, or did I misunderstood you ?

Thanks Tom, I think that does indeed answer my question exactly.  I'll 
know for sure in a few hours when I try and implement it, but it makes 
perfect sense and I can't imagine it won't work perfectly. :)

> regards,
> Tom


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message