commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Carman <ja...@carmanconsulting.com>
Subject Re: [beanutils] Using propertyUtils
Date Tue, 20 Jul 2010 15:56:11 GMT
Take a look at:

http://commons.apache.org/beanutils/v1.8.3/apidocs/org/apache/commons/beanutils/PropertyUtils.html#getPropertyDescriptors%28java.lang.Class%29

You can do:

PropertyDescriptor[] descriptors =
PropertyUtils.getPropertyDescriptors(MyBeanClass.class);

Then, iterate through the descriptors to find the one you want (by
property name).


On Tue, Jul 20, 2010 at 11:34 AM, Martin Irigaray <martinib@gmail.com> wrote:
> Hi, i want to use propertyUtils to get a property type of a Class.
> If i don't instantiate the Class, i always get NULL for the
> getPropertyType method.
> Does exists a way to get that information without instantiating the class?.
>
> I also try getPropertyDescriptors but then i will have to loop the result array,
> which don't want to
>
> Thanks
> --
> Martín Irigaray
> martin.irigaray@ideati.net
> http://www.ideati.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

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


Mime
View raw message