idoc java_GitHub - houbb/idoc: Generate doc for java maven project.(java 项目自动生成文档)

i-doc 项目简介

为 java 项目生成项目文档。

基于原生的 java 注释,尽可能的生成简介的文档。用户可以自定义自己的模板,生成自己需要的文档。

68747470733a2f2f6d6176656e2d6261646765732e6865726f6b756170702e636f6d2f6d6176656e2d63656e7472616c2f636f6d2e6769746875622e686f7562622f69646f632f62616467652e737667

68747470733a2f2f7777772e7472617669732d63692e6f72672f686f7562622f69646f632e7376673f6272616e63683d6d6173746572

68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f686f7562622f69646f632f62616467652e7376673f6272616e63683d6d6173746572

特性

基于 maven 项目生成包含大部分信息的元数据

默认支持 markdown 简化文档的生成,支持自定义模板

支持用户自定义文档生成器

支持用户自定生成文档的类过滤器

新特性

添加字段类型别名,支持用户自定义

变更日志

快速入门

需要

jdk1.8+

maven 3.x+

maven 引入

使用 maven 引入当前 idoc 插件。

com.github.houbb

idoc-core

0.1.0

测试对象的创建

为了演示文档,我们创建了一个 Address 对象。

package com.github.houbb.idoc.test.model;

/**

* 地址

* @author binbin.hou

* @since 0.0.1

*/

public class Address {

/**

* 城市

*/

private String country;

/**

* 街道

*/

private String street;

public String getCountry() {

return country;

}

public void setCountry(String country) {

this.country = country;

}

public String getStreet() {

return street;

}

public void setStreet(String street) {

this.street = street;

}

}

执行插件

mvn com.github.houbb:idoc-core:0.0.2:idoc

命令行日志信息

[INFO] ------------------------------------ Start generate doc

[INFO] 共计 【1】 个文件待处理,请耐心等待。进度如下:

==================================================================================================== 100%

[INFO] Generator doc with docGenerator: com.github.houbb.idoc.core.api.generator.ConsoleDocGenerator

[INFO] ------------------------------------ 文档信息如下:

[类名] com.github.houbb.idoc.test.model.Address

[类信息] {"comment":"地址","docAnnotationList":[],"docFieldList":[{"comment":"城市","name":"country","type":"java.lang.String"},{"comment":"街道","name":"street","type":"java.lang.String"}],"docMethodList":[{"docMethodParameterList":[],"docMethodReturn":{"fullName":"java.lang.String","name":"String","packageName":"java.lang"},"docTagList":[],"exceptionList":[],"modifiers":["public"],"name":"getCountry","seeList":[],"signature":"getCountry()"},{"docMethodParameterList":[{"docAnnotationList":[],"name":"country","type":"java.lang.String"}],"docMethodReturn":{},"docTagList":[],"exceptionList":[],"modifiers":["public"],"name":"setCountry","seeList":[],"signature":"setCountry(country)"},{"docMethodParameterList":[],"docMethodReturn":{"fullName":"java.lang.String","name":"String","packageName":"java.lang"},"docTagList":[],"exceptionList":[],"modifiers":["public"],"name":"getStreet","seeList":[],"signature":"getStreet()"},{"docMethodParameterList":[{"docAnnotationList":[],"name":"street","type":"java.lang.String"}],"docMethodReturn":{},"docTagList":[],"exceptionList":[],"modifiers":["public"],"name":"setStreet","seeList":[],"signature":"setStreet(street)"}],"docTagList":[{"lineNum":5,"name":"author","parameters":["binbin.hou"],"value":"binbin.hou"},{"lineNum":6,"name":"since","parameters":["0.0.1"],"value":"0.0.1"}],"fullName":"com.github.houbb.idoc.test.model.Address","modifiers":["public"],"name":"Address","packageName":"com.github.houbb.idoc.test.model"}

[INFO] ------------------------------------ Finish generate doc

进一步学习

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值