tags:

views:

109

answers:

3

I would like a program that logs every call I made to a class folder like com.mycompany.mylibrary and outputs a valid java program, much like http://linux.die.net/man/1/ltrace does in Linux.

Do you guys know any call interceptor like the one I am looking for?

+2  A: 

I guess you want to use some aspect-oriented mechanism like AspectJ. Although I'm confused by what you mean by 'outputs a valid Java program'

Brian Agnew
A: 

I do not really need a valid Java program just as ltrace outputs an almost valid C program if it not where for the return values. In fact I just need the tracing.

Please don't answer your own question to reply to another answer - answers are not forum posts and their sequence may change. Instead, either comment on the answer you are replying to or edit your question to clarify it.
Michael Borgwardt
This really doesn't make much sense...
matt b
A: 

I have found: http://www.jroller.com/carlossg/entry/tracing_an_application_using_aspectj but I will have to recompile the jars I need to trace since AspectJ poincuts are injected at compile time. So I am still looking for a solution that does not need any recompilation just like ltrace works for C.