String clazz = this.getClass().getName();
String method = Thread.currentThread() .getStackTrace()[1].getMethodName();
System.out.println(clazz);
System.out.println(method);
获取java类和方法名
转载于:https://www.cnblogs.com/testway/p/5337436.html
String clazz = this.getClass().getName();
String method = Thread.currentThread() .getStackTrace()[1].getMethodName();
System.out.println(clazz);
System.out.println(method);
转载于:https://www.cnblogs.com/testway/p/5337436.html