简体   繁体   English

JavaDoc - 我可以将方法分成组吗?

[英]JavaDoc - Can I divide methods into groups?

I am currently creating the documentation for a class with many functions. 我目前正在为具有许多功能的类创建文档。 Is there any way to organize the JavaDoc such that the methods in the overview are divided into a few categories? 有没有办法组织JavaDoc,以便概述中的方法分为几个类别?

Maybe try to refactor it so you don't have "many functions" inside one class. 也许尝试重构它,这样你就不会在一个类中有“很多功能”。 It is much better to divide code into small fractions that are easier for maintaining, readability, testing, debugging, documenting etc.. 将代码划分为更易于维护,可读性,测试,调试,记录等的小部分要好得多。

The JavaDoc tool does not have such a functionality. JavaDoc工具没有这样的功能。 Even the JDK's methods aren't grouped in such a fashion. 甚至JDK的方法也没有以这种方式分组。

I am afraid its not Javadoc - but doxygen supports grouping items in the output. 我担心它不是Javadoc - 但是doxygen支持在输出中对项目进行分组。

I've used doxygen in preference to Javadoc for personal projects, and for multi-language projects professionally. 我使用doxygen而不是Javadoc用于个人项目,以及专业用于多语言项目。 The documentation comment format is close enough to Javadoc for the most part, but I've found it much richer and extendable, and the output is just better. 文档注释格式在很大程度上与Javadoc足够接近,但我发现它更丰富和可扩展,输出更好。

Heck, for one project we published the Users Guide and API Guide as PDF through doxygen... 哎呀,对于一个项目,我们通过doxygen发布了用户指南和API指南作为PDF ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM