Just like this question, when debugging an application, I want to let the application pause at a breakpoint only when the current call stack has a certain method. However, I'm using Netbeans.
In Java the current call stack could be obtained in several ways, like
Thread.currentThread().getStackTrace()
which returns an array of stack trace elements.
Is it possible to iterate through the array (or converted list), check the method names and return a boolean in just one line?
Or, if I need to write a method which checks the array and returns the boolean based on existence of interested method, where should I put it?