java code to run in acquiring the function name being called

The problem has always been puzzled me when I saw this code, record it, memo

Thread.currentThread().getStackTrace()[1].getMethodName()

Reproduced in: https: //my.oschina.net/kivensoft/blog/549371

Guess you like

Origin blog.csdn.net/weixin_34146986/article/details/92058658
Recommended