问题标签 [doclet]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - 如何在一个项目中使用不同的 doclet?(maven 插件 javadoc)
在 JavaDoc 中记录的代码库中,目前我们希望转换为基于 Markdown 的文档。
存在解析 Markdown 文档注释的 doclet。
但是,一次重写一个企业项目中的所有文档注释是不可行的。
有没有办法一次启动和转换一个文档评论,并且仍然获得聚合 API 文档?(我想,如果有的话,它将通过注释或 docstring 标签工作,它充当要使用的 doclet 之间的切换)。
如果存在,maven 配置是什么?
可能相关的问题:
java - 为什么我不能导入 jdk.javadoc.doclet 包?
我想为 JavaDoc 制作一个自定义 doclet,我最初尝试使用com.sun.javadoc
这个应用程序的包。我成功地创建了一个 doclet 并将其与 JDK8 一起使用,但是使用 JDK12 执行此操作会警告我该类已被弃用,并且很快就会失去支持。
我在另一台使用 OpenJDK15 的计算机上尝试了与 JavaDoc 相同的 doclet(运行java --version
给了我以下输出:)
它真的不支持:(我无法使用它,它给了我一条消息,说这个 doclet 不受支持。
经过一番研究,我发现新的 jdk 使用jdk.javadoc.doclet
API 来创建 doclet。我使用上面的类创建了一个基本的 doclet,它实际上什么都不做,只是实现了所有方法并尝试编译,但是编译器给了我一个错误说package jdk.javadoc.doclet does not exist
。
我使用 IntelliJ 作为我的 IDE,但它没有通过 IntelliSense 显示任何错误。IntelliJ 认为该包存在,甚至为该包的类中的方法提供代码突出显示。
scala - Extract source comments from a Scala source file
I would like to programmatically extract the code comments from a Scala source file.
I have access to both the source file and objects of the classes whose comments I am interested in. I am also open to writing the comments in the Scala source file in a specific form to facilitate extraction (though still following Scaladoc conventions).
Specifically, I am not looking for HTML or similar output.
However, a json object I can then traverse to get the comments for each field would be perfectly fine (though json is not a requirement). Ideally, I would like to get a class or class member comment given its "fully qualified" name or an object of the class.
How do I best do this? I am hoping for a solution that is maintainable (without too much effort) from Scala 2.11 to Scala 3.
Appreciate all help!