Link to home
Start Free TrialLog in
Avatar of dkim18
dkim18

asked on

PropertyDescriptor - getting declared field names

Hi Experts,

If I use PropertyDescriptor, is there any way that I can get declared field names (not setter/getter method names)?

PropertyDescriptor pd[] = PropertyUtils.getPropertyDescriptors(aForm);

aForm is ActionForm and I want to get all the fields in that class.

thx,
ASKER CERTIFIED SOLUTION
Avatar of Mayank S
Mayank S
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dkim18
dkim18

ASKER

I used getName() and I got what I wanted. Somehow, I applied getName() by using java.lang.reflect.Method variable and getting method name and I was wondering. My bad...