Javadoc: Difference between revisions

Content deleted Content added
collect all examples together
Move Doclet from the end; the table should be later; edit for readabilty and integration into this article; I think it was merged some time ago but done sloppily
Line 97:
</syntaxhighlight>
 
== Doclets ==
=== Table of Javadoc tags ===
A Doclet programsprogram workworks with the Javadoc toolto select which content to generateinclude in the documentation, fromformat codethe writtenpresentation inof [[Javathe (programmingcontent language)|Java]]and create the file that contains the documentation.<ref>{{cite web | url=https://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/doclet/overview.html | title=Doclet Overview }}</ref> A Doclet is written in Java and uses the {{Javadoc:SE|jdk/javadoc/doclet|name=Doclet API|module=jdk.javadoc}},
 
The {{Javadoc:SE|jdk/javadoc/doclet|StandardDoclet|module=jdk.javadoc}}[https://docs.oracle.com/javase/9/javadoc/javadoc-command.htm#JSJAV-GUID-04BFA924-7C45-4E9C-91D1-0B77D97E65AB] included with Javadoc generates [[API]] documentation as frame-based [[HTML]] files. ManyOther non-standard docletsDoclets are available on the web {{Citation needed|reason=Is this still true today?|date=December 2017}}, often for free. These can be used to:
* Create other non-API types of documentation (non-API)
* Output theto documentationa toformat other non-than HTML file types; such as [[PDF]]
* Output the documentation as HTML with additional features such as a search or with embedded [[Unified Modeling Language|UML]] diagrams generated from the Java classes
 
== Tags ==
{{Update|section|inaccurate=yes|reason=Should be updated according to the [https://docs.oracle.com/en/java/javase/21/docs/specs/javadoc/doc-comment-spec.html official documentation]|date=November 2023}}
Some of the available Javadoc tags<ref>[https://docs.oracle.com/en/java/javase/13/docs/specs/javadoc/doc-comment-spec.html JavaSE 13 Documentation Comment Specification]</ref> are listed in the table below:
Line 158 ⟶ 166:
|
|}
 
== Doclets ==
Doclet programs work with the Javadoc tool to generate documentation from code written in [[Java (programming language)|Java]].<ref>{{cite web | url=https://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/doclet/overview.html | title=Doclet Overview }}</ref>
 
Doclets are written in the Java programming language and use the {{Javadoc:SE|jdk/javadoc/doclet|name=Doclet API|module=jdk.javadoc}} to:
* Select which content to include in the documentation
* Format the presentation of the content
* Create the file that contains the documentation
 
The {{Javadoc:SE|jdk/javadoc/doclet|StandardDoclet|module=jdk.javadoc}}[https://docs.oracle.com/javase/9/javadoc/javadoc-command.htm#JSJAV-GUID-04BFA924-7C45-4E9C-91D1-0B77D97E65AB] included with Javadoc generates [[API]] documentation as frame-based [[HTML]] files. Many non-standard doclets are available on the web {{Citation needed|reason=Is this still true today?|date=December 2017}}, often for free. These can be used to:
* Create other non-API types of documentation
* Output the documentation to other non-HTML file types such as [[PDF]]
* Output the documentation as HTML with additional features such as a search or with embedded [[Unified Modeling Language|UML]] diagrams generated from the Java classes
 
== See also ==