Re: How do you programatically get access to the names and contents of
If I understood your problem right, you can use classes in java.lang and
java.lang.reflect packages to write a class ( let's call it CoreDump ), that will
accept an object as a parameter, determine its Class, then loop through the
methods and fields and print ( or collect and return ) the relevant information.
Hope this helps.
> But if you are running a web application which is running java components
> it would be a good thing if it was possible to retrieve variable information
> programmtically if you want to do debug stuff, for example
> with the Log4j component.
> Remote debugging of java components which is executed from JSP or Servlets
> with JBuilder requires enterprise edition as far as I can see, and
> that is very expensive.
> If it really is so impossible to get local variable information
> at runtime, then how are these debugging environments for example
> JBuilder implemented ?
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center