File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Help with solutions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Help with solutions" Watch "Help with solutions" New topic

Help with solutions

Nikhil Sun
Ranch Hand

Joined: Nov 13, 2005
Posts: 108
Hi friends,

I am developing an utility for my team.I am working with a file.
Based on this file I generate a class at runtime.This class is a bean type of thing with getters & setters.This class is generated in a folder on my system.Now I have to display as many fields on the browser as there are getters in the class.For this I used reflection and successfully displayed that many fields on the browser.When the user inputs data I again used reflection to call the setters to set the data.So far so good.Now I am required to send this bean instance with the set values as an argument to another method in another program.I can't modify this method or program as it is a standard one already available.But as I was using reflection what I have with me now is the instance of the bean class and not the actual bean instance.Is there a way in which I can get the actual bean instance along with my set values?
Jeremy Botha
Ranch Hand

Joined: Feb 16, 2005
Posts: 125

Should do the trick.


McFinnigan? Never heard of him. Nobody here but us chickens...<br /> <br />SCJP for Java 1.4<br />SCJD for Java 5.0
Nikhil Sun
Ranch Hand

Joined: Nov 13, 2005
Posts: 108
Thanks Jeremy...that should definitely do the trick.Too silly of me that I didn't reflect on the constructor/s available for the class instance!!!thanks a lot for waking me up:-)
I agree. Here's the link:
subject: Help with solutions
It's not a secret anymore!