[ 
https://issues.apache.org/jira/browse/BEANUTILS-270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Niall Pemberton updated BEANUTILS-270:
--------------------------------------

    Fix Version/s: LATER THAN 1.8.0

> findPropertyDescriptor method with a class argument
> ---------------------------------------------------
>
>                 Key: BEANUTILS-270
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-270
>             Project: Commons BeanUtils
>          Issue Type: Wish
>          Components: Bean / Property Utils
>    Affects Versions: 1.7.0
>            Reporter: Matthias Wuttke
>            Priority: Minor
>             Fix For: LATER THAN 1.8.0
>
>
> I would like to suggest to add a findPropertyDescriptor variant that takes a 
> class instead of a bean as an argument. This is useful for situations where I 
> want to deal with abstract classes and their properties as  I cannot 
> instantiate them to use findPropertyDescriptor(Object, String)
>       public PropertyDescriptor findPropertyDescriptor(Class clazz, String 
> propertyName) {
>               PropertyDescriptor[] descriptors = 
> PropertyUtils.getPropertyDescriptors(clazz);
>               for (int i = 0; i < descriptors.length; i++)
>             if (propertyName.equals(descriptors[i].getName()))
>                 return (descriptors[i]);
>               return null;
>       }
> Best regards,
> Matthias

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to