
Use to enumerate the properties of the class. Note that, unlike Javadoc, qualified names always use the dot character to separate the components, even before a method name: You can also use qualified names in the links. If you want to specify a custom label for the link, use the Markdown reference-style syntax: To link to another element (class, method, property, or parameter), simply put its name in square brackets: Inline markupįor inline markup, KDoc uses the regular Markdown syntax, extended to support a shorthand syntax for linking to other elements in the code. Can be used for elements which are not part of the official API of a module but still have to be visible externally. the element from the generated documentation.
DOXYGEN NEWLINE SOFTWARE
the version of the software in which the element being documented was introduced. the author of the element being documented. identifierĪdds a link to the specified class or method to the See also block of the documentation. identifierĮmbeds the body of the function with the specified qualified name into the documentation for the current element, in order to show an example of how the element could be used. Since Kotlin does not have checked exceptions, there is also no expectation that all possible exceptions are documented, but you can still use this tag when it provides useful information for users of the class. class, classĭocuments an exception which can be thrown by a method. This tag can be used for documenting properties declared in the primary constructor, where putting a doc comment directly before the property definition would be awkward. nameĭocuments the property of a class which has the specified name. The following two syntaxes are therefore name description. To better separate the parameter name from the description, if you prefer, you can enclose the name of the parameter in brackets. KDoc currently supports the following block tags: nameĭocuments a value parameter of a function or a type parameter of a class, property or function. * This class has no useful logic it's just a documentation example. Here's an example of a class documented using KDoc: Every line of the comment may begin with an asterisk, which is not considered part of the contents of the comment.īy convention, the first paragraph of the documentation text (the block of text until the first blank line) is the summary description of the element, and the following text is the detailed description.Įvery block tag begins on a new line and starts with the character. Just like with Javadoc, KDoc comments start with /** and end with */.

See the Dokka README for usage instructions.ĭokka has plugins for Gradle, Maven, and Ant, so you can integrate documentation generation into your build process. Kotlin's documentation generation tool is called Dokka. In its essence, KDoc combines Javadoc's syntax for block tags (extended to support Kotlin's specific constructs) and Markdown for inline markup.
DOXYGEN NEWLINE CODE
The language used to document Kotlin code (the equivalent of Java's Javadoc) is called KDoc.
