Posted By:
Christopher_Schultz
Posted On:
Friday, January 11, 2002 05:48 AM
Before JDK 1.4, you had to get a stack trace as a String and parse it yourself (search JavaWorld for 'check point' -- they've got an article where they implement fine-grained access control for methods based upon their caller).
In JDK 1.4, there's a way to get detailed information about a stack trace so that you don't have to parse it. Take a look at the javadoc for the Throwable class and see what's available.
-chris