Addition of a special form of comment used to combine documentation directly into the code from which web pages can be created to describe the code or API.
Proposed by:Jeff Walker (language designer)
Experts to Contact: Status: Being ConsideredJava has demonstrated the great usefulness of documentation of this kind.
Description:Document comments are block comments with an extra asterisk at the beginning, so they begin '/**
'. This is followed by multiple lines beginning with aligned asterisks until the comment termination is found.
/**
* Text describing the object.
*
* @tag
*/
Text in these blocks describes the object or expression following the comment. A documentation comment may appear before any kind of object to describe that object. Documentation comments may also appear in object bodies in some cases. Special tags are introduced by the '@
' sign. These should be put on individual lines after the textual comments.
unascribedif the author is unknown. Multiple author tags may be included if their are multiple authors.
Optional other suggestions. Allow documentation comments of the form '//*
' which could contain single line tags. Example @break used to put break points or conditional break points in. Also @pre and @post to specify pre and post conditions.
module
{
/**
* The structure of file entries
* @author Jeff Walker
* @since 1.2
*/
public class Entry
{
/**
* Method to access the text
* @return the text
*/
public getName() -> string
{
return name;
}
}
}