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 <[email protected]> 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
> [email protected]
> http://www.ideati.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to