String clazz = this.getClass().getName();
String method = Thread.currentThread() .getStackTrace()[1].getMethodName();
System.out.println(clazz);
System.out.println(method);
获取java类和方法名
最新推荐文章于 2024-04-30 12:12:17 发布
String clazz = this.getClass().getName();
String method = Thread.currentThread() .getStackTrace()[1].getMethodName();
System.out.println(clazz);
System.out.println(method);