How to get a JavaDoc of a method at run time?

前端 未结 5 1968
无人及你
无人及你 2020-11-29 11:51

Its easy to get a method Name of a Class at run time
BUT
How i can get a JavaDoc of a method at run time ?

As the f

5条回答
  •  时光取名叫无心
    2020-11-29 12:45

    You can run javadoc programmatically and passing options to generate documentation for the class that you want and then parsing the generated document to get the documentation for the method that you want. You will need the source code at runtime because comments are not in the class file.

提交回复
热议问题