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()
如果忍耐算是坚强 我选择抵抗 如果妥协算是努力 我选择争取
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M