Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 97815 invoked from network); 12 Apr 2002 21:35:36 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 12 Apr 2002 21:35:36 -0000 Received: (qmail 28111 invoked by uid 97); 12 Apr 2002 21:35:40 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 28089 invoked by uid 97); 12 Apr 2002 21:35:40 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 28076 invoked from network); 12 Apr 2002 21:35:39 -0000 Message-ID: <005401c1e26a$e06f8420$ce4e18d4@oemcomputer> From: "Stephen Colebourne" To: "Jakarta Commons Developers List" References: <20020411211834.P27021-100000@icarus.apache.org> <3CB696B2.2080706@keyboardmonkey.com> Subject: Re: [BeanUtils] PropertyUtils and DynaBeans (getPropertyDescriptors) Date: Fri, 12 Apr 2002 22:41:57 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I've just spent the evening trying to figure out the property descriptor classes myself. For the joda project I wanted to return a BeanInfo specifying a description of the bean. But it seems to be a bit tricky. PropertyDescriptor is OK for my needs (just about) IndexedPropertyDesciptor is not much use as it only covers arrays, not Lists MappedPropertyDescriptor seems to be of limited use. It is picked up from BeanInfo, but does not include the Map getXxxMap() type method as Arron noted. Nothing really handles Lists, and I also noted that DynaBeans don't use PropertyDescriptors. One solution would be for beanutils to have a ListPropertyDescriptor that copes with getXxxList() and getXxx(int). Plus extending MappedPropertyDescriptor to cover getXxxMap(). This all seems hard work however. The beans spec is pretty outdated these days (thats why I started joda really). My question is whether these extended (ie. java.beans) PropertyDescriptor classes really are that useful - can they really be used as general purpose classes without writing a full replacement to java.beans.Introspector? > What's the MappedPropertyDescriptor class in the package then?... > Seems to work too. For "Object getMyProperty(String key)". The > getPropertyDescriptor method seems to find it okay. > > Or is something else needed?... > > Only thing which made it an issue before was the other variety > "java.util.Map getMyProperty()" but then again, the > IndexedPropertyDescriptor doesn't like that version (Get the whole > collection, then use the index on it) of property methods either. > > Arron. > > Craig R. McClanahan wrote: > > > > >On Fri, 12 Apr 2002, Matt Johnson wrote: > > > >>Date: Fri, 12 Apr 2002 10:45:39 +1000 > >>From: Matt Johnson > >>Reply-To: Jakarta Commons Developers List > >>To: commons-dev@jakarta.apache.org > >>Subject: [BeanUtils] PropertyUtils and DynaBeans (getPropertyDescriptors) > >> > >>[apologies - package name now inserted in subject] > >> > >>Folks, > >> > >>Is anyone working towards fixing PropertyUtils to work with DynaBeans (ie, > >>where all the FIXME tags are)? What's the status (if any), and will this be > >>included in 1.1 final? > >> > >>If this is currently in limbo, has anyone already patched this privately > >>(before I go and diy)? > >> > > > >Patches to these areas would be welcomed! Some of them are going to get > >really interesting, though, because the standard PropertyDescriptor > >doesn't really contemplate such a thing as a mapped property. > > > >>Thanks, > >> > >> > >>Matt J. > >> > > > >Craig > > > > > >-- > >To unsubscribe, e-mail: > >For additional commands, e-mail: > > > > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > > -- To unsubscribe, e-mail: For additional commands, e-mail: