I am trying to find an answer to a simple question, and no luck so far.
The question is: can i use java class loader (implement a new class loader) to investigate the stack trace ?
To be more precise,
I am talking about scenerio in which I am running a test on some code, and I want to use the stack trace in order to determine which of the test classes run this code ? (one way is to look on the closest test in stack trace)
another advance idea, is to use the class loader in order to find the closest "test Method" that ran current code..
Edit:
I dont have an access to the tests that run the code nor the code itself.. this is why I am thinking about the class loader.. -> I can run a class loader, but I can't change the application code or application test code.. (this is why i can't use Thread.getStackTrace()).