0

Possible Duplicate:
Get current stack trace in Java

Here is the thing, i want to get a list of all called methods in a java class. So far i've been using eclemma, but that just insn't enough. I also want the order in which the methods have been called.

Community
  • 1
  • 1
Charles
  • 570
  • 11
  • 29
  • You mean you need the call stack? If yes, use Thread.currentThread().getStackTrace() – kol Jun 11 '12 at 08:10

1 Answers1

1

You can log each method as it is called (with its arguments if you like). You can add a line to each method or use AOP to do this for you.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130