- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在工作中一直使用 .jd 文件,在我的本地计算机上构建它以将其转换为 html...
但是,我仍然对 .jd 文件的用途感到困惑?我做了一些研究,其定义是:“Javadoc 是一种从代码中的 Javadoc 注释生成 html 文档(类似于 java.sun.com 的引用页面)的工具。”
当我查看 .jd 文件代码时,它们看起来非常像 html。他们有 <p>
标签和 <li>
标签。程序员编写 javadoc 代码吗?还是Javadoc是一个工具(我很模糊,一个叫Javadoc的生成.jd文件的软件工具?)从Java代码中提取注释?
谁能帮我理解一下?由于我不直接处理生成 .jd 文件,因此很难理解它的用途以及它到底是什么......
非常感谢!
最佳答案
JavaDoc 由开发人员编写,在其源代码中嵌入了注释。
所以,例如:
/**
* Returns an Image object that can then be painted on the screen.
* The url argument must specify an absolute {@link URL}. The name
* argument is a specifier that is relative to the url argument.
* <p>
* This method always returns immediately, whether or not the
* image exists. When this applet attempts to draw the image on
* the screen, the data will be loaded. The graphics primitives
* that draw the image will incrementally paint on the screen.
*
* @param url an absolute URL giving the base location of the image
* @param name the location of the image, relative to the url argument
* @return the image at the specified URL
* @see Image
*/
public Image getImage(URL url, String name) {
try {
return getImage(new URL(url, name));
} catch (MalformedURLException e) {
return null;
}
}
这个例子记录了一个叫做 getImage 的方法。
JavaDoc 很棒,因为它是开发人员可以在编写代码时编写的文档,就在他们的代码旁边,并且在运行生成器之后,他们拥有其他人可以轻松阅读的很好的技术文档。
您在 .jd 文件中看到 html 的原因是出于格式化原因,一些 html 可以嵌入到 JavaDoc 中(参见示例)
关于java - .jd 文件到底有什么用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34141780/
这对你们来说可能很简单,但由于我是java新手,所以我想知道实际上什么是 接下来的部分会发生什么? if (args.length > 0) { file = args[0]; } publi
在我的 View Controller 中,我将 UITapGestureRecognizer 添加到 self.view。我在 self.view 之上添加了一个小 View 。当我点击小 View
我今天尝试从 Obj-C 开始并转到 Swift,我正在阅读文档。我试图在 Swift 中创建一个简单的 IBOutlet,但它不断给我这些错误。 View Controller 没有初始化器 req
我正在尝试使用 VIM 完成(字典和当前缓冲区),但我遇到了问题?和 !在方法名称的末尾。我能以某种方式向 vim 解释方法名称(基本上是单词)最后只能有它,而且只有一个,即 method_name
我是一名优秀的程序员,十分优秀!