Sometimes you need to know the method name of the currently executed method. The method is as follows:
String method = Thread.currentThread().getStackTrace()[1].getMethodName();
Sometimes you need to know the method name of the currently executed method. The method is as follows:
String method = Thread.currentThread().getStackTrace()[1].getMethodName();