8 Replies Latest reply on May 19, 2010 12:19 AM by EJP

    How to create a constructor dynamically

      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.