Javadoc tutorial

  1. 1. What is javadoc
  2. 2. Javadoc tags

1. What is javadoc

A tool comes with JDK and used for generating Java code documentation in HTML format from Java source code, which requires documentation in a predefined format

2. Javadoc tags

  • @author
  • {@code}
    • Displays text in code font without interpreting the text as HTML markup or nested javadoc tags.
  • {@docRoot}
    • Represents the relative path to the generated document’s root directory from any generated page.
  • @deprecated
  • @exception
    • Adds a Throws subheading to the generated documentation, with the classname and description text.
  • {@inheritDoc}
    • Inherits a comment from the nearest inheritable class or implementable interface.
  • {@link}
    • Inserts an in-line link with the visible text label that points to the documentation for the specified package, class, or member name of a referenced class.
  • @param
  • @return
  • @see
  • @serial
  • @serialData
    • Documents the data written by the writeObject( ) or writeExternal( ) methods.
  • @serialField
    • Documents an ObjectStreamField component.
  • @since
    • Adds a since heading with the specified since text to the generated documentation
  • @throws
  • {@value}
    • When {@value} is used in the doc comment of a static field, it displays the value of that constant.

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 stone2paul@gmail.com

文章标题:Javadoc tutorial

文章字数:177

本文作者:Leilei Chen

发布时间:2020-02-05, 19:04:12

最后更新:2020-02-05, 19:04:33

原始链接:https://www.llchen60.com/Javadoc-tutorial/

版权声明: "署名-非商用-相同方式共享 4.0" 转载请保留原文链接及作者。

目录
×

喜欢就点赞,疼爱就打赏