Note: information on this page refers to Ceylon 1.0, not to the current release.
doc annotation
The doc annotation adds freeform API documentation to a declaration.
Usage
Explict doc annotation:
doc ("Some documentation")
void example(){
}
Implict use of doc via the "anonymous annotation":
"More documentation"
void furtherExample() {
}
Description
The doc annotation is processed by the
ceylon doc tool,
which assumes it contains Markdown formatted text.
Anonymous annotation
As shown above, the annotation can be used in two forms, either
- using explicit invocation of
doc, or - as a string literal, when it is the first annotation in the list of annotations of the declaration
The anonymous form is very strongly preferred.
See also
doc- Reference for annotations in general