January 24, 2004Trace wizardryIndeed, Cameron's trick is pretty cool. I have been using a similar trick for a while now, except that when I wrote it, we didn't have StackFrame support, so it was all about dirty manual parsing of the stack trace. However, my technique is different from Cameron's in the following ways:
All that being said, IDE's make this kind of hack almost useless these days. For example, I have a template called "ppp" and all I need to do is type "ppp<space>" at any moment to have the trace method automatically implemented with the class name and everything else in it. But it's nowhere near as elegant as the trace walking. Posted by cedric at January 24, 2004 02:24 PM Comments
I'm not sure if you noticed, but my "StackFrame support" is built manually by parsing the exception stack trace ;-) .. the trace() code that I posted works all the way back to 1.2. Peace. Posted by: Cameron at January 24, 2004 03:42 PMPost a comment
|