[+] Get the current name of the Java method, class

1, the current method of obtaining Name: Thread.currentThread () .getStackTrace () [1] .getMethodName ()

2, get the name of the current class: this.getClass () getName ().

 

 

 

Guess you like

Origin www.cnblogs.com/danhuai/p/11852148.html