This discussion is archived
8 Replies Latest reply: May 18, 2010 5:19 PM by EJP RSS

How to create a constructor dynamically

843798 Newbie
Currently Being Moderated
Hi ,

I want to create a constructor dynamically.
I have a bean class with 30 fields.
In my application I want to use this bean objects to hold the data returned from a ResultSet.
But the problem is I have dynamic columns returned by the ResultSet. some times it gives 10 & some times it will be 20.
I want to create a constructor on the fly with these dynamic columns.
Is it possible with the reflection API ? if possible, please give me sample code or link.


thanks
bhuvan