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