Image

Imagejaq wrote in Imagejava_dev

call stack introspection

I'm reading an article that suggests you can do introspection of the call stack by using
new Throwable().getStackTrace()
and looking through the array of StackTraceElements it returns. Which is true, it should work. But isn't this a very expensive operation to be performing?