【Java】+获取当前方法、类的名称

1、获取当前方法名称:Thread.currentThread() .getStackTrace()[1].getMethodName()

2、获取当前类的名称:this.getClass().getName()

猜你喜欢

转载自www.cnblogs.com/danhuai/p/11852148.html
今日推荐