很简单,直接看代码:
public void showClassAndMethod() {
System.out.println(this.getClass().getSimpleName() + ":"
+ new Exception().getStackTrace()[0].getMethodName());
}
2021-11-07 13:36:22
很简单,直接看代码:
public void showClassAndMethod() {
System.out.println(this.getClass().getSimpleName() + ":"
+ new Exception().getStackTrace()[0].getMethodName());
}