Java获取当前运行方法所在的类和方法名

很简单,直接看代码:

	public void showClassAndMethod() {
		System.out.println(this.getClass().getSimpleName() + ":"
				+ new Exception().getStackTrace()[0].getMethodName());
	}
原文地址:https://www.cnblogs.com/acode/p/7495014.html