简体   繁体   English

如何创建我的代码摘要

[英]How to create a summary of my code

I want to automatically create some sort of report of my code(java).我想自动创建我的代码(java)的某种报告。 Example: I have something like:示例:我有类似的东西:

public classe qwerty{
//CODE
/*
* Converts ...
* @param s
*        -string...
*/
public static int mult(string s)
   {
   //CODE
   } 
}

And I want to create something that looks like this:我想创造一些看起来像这样的东西:

...............................
public static int mult(string s)
Converts ...

Paramters:
   s (String): string...
Returns (int)
.................................
ETC

Is there any tool for that??有那个工具吗??

Maybe you are searching for javadoc 也许你正在寻找javadoc

Javadoc creates html-files of your code as a documentation. Javadoc创建代码的html文件作为文档。 Just look at some tutorial 只看一些教程

If you have looked at javadoc, and it is not suitable for you, then look at this solution 如果您已经查看了javadoc,并且它不适合您,请查看此解决方案

How to read Javadoc comments by reflection? 如何通过反射阅读Javadoc注释?

look at answer "doclet" 看看答案“doclet”

If you are using IntelliJ then before the method you want to comment you have to type / ** and hit enter.如果您使用的是IntelliJ,那么在您要评论的方法之前,您必须键入/ ** 并按 Enter。 It automatically creates a comment with params or without depending on your function.它会根据您的功能自动创建带有或不带有参数的注释。

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

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