Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

trace the class calling other class' method  RSS feed

 
Hardy Chou
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
as above, i would like to know how we can trace back to know who call who. thanks a ton.
hardy
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do that by creating an Exception and using its stack trace - see the java.lang.Throwable JavaDocs - especially getStackTrace (if you are using Java 1.4)
The stack trace has the complete calling sequence.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!