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

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

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

 

 

 

相关文章:

  • 2022-02-01
  • 2021-07-01
  • 2021-10-21
  • 2022-12-23
  • 2021-06-09
  • 2022-02-15
猜你喜欢
  • 2021-04-06
  • 2022-02-24
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案