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

前端 未结 5 1972
无人及你
无人及你 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:33

    You can't : the class file doesn't contain the comments.

    A "solution" would be to generate the javadoc as HTML when you build your program and to build an URL from the name of the class and the name of the method. You could also generate the javadoc in a more suitable format than HTML using the doclet API.

提交回复
热议问题