Getting the name of the currently executing method

前端 未结 22 2740
闹比i
闹比i 2020-11-22 03:33

Is there a way to get the name of the currently executing method in Java?

22条回答
  •  我寻月下人不归
    2020-11-22 04:24

    Just in case the method which name you want to know is a junit test method, then you can use junit TestName rule: https://stackoverflow.com/a/1426730/3076107

提交回复
热议问题