For debugging purposes, I need to follow the execution of some piece of code, within a class. I would like to generate a log for all method calls, in XML, like :
<call class='pack.age.MyClass' method='myMethod1'>
<param name='param1'>param1.toString() value</param>
...
<call>Call to other method within myMethod1; you get the idea</call>
</call>
Because the class is long and has lots of methods, I wondered if there is a way to access the parameters generically, maybe using reflection. I am inside of the method, and I want to loop on the parameters given to this call of the method. It would ease my pain and allow me to make a regexp to add the log lines. Is it possible ?
Any other neat way to do it appreciated (but AOP alas not really an option).