【Java】+获取当前方法名 or 类名
1、获取当前类名:
Thread.currentThread().getStackTrace()[1].getClassName()
this.getClass().getSimpleName() 也可以
2、获取当前方法名:
Thread.currentThread().getStackTrace()[1].getMethodName()

如果忍耐算是坚强 我选择抵抗 如果妥协算是努力 我选择争取
1、获取当前类名:
Thread.currentThread().getStackTrace()[1].getClassName()
this.getClass().getSimpleName() 也可以
2、获取当前方法名:
Thread.currentThread().getStackTrace()[1].getMethodName()
