5

ScalaDoc にコード例を追加するための標準的な規則 (またはタグ) は何ですか? 以下のコードの例では、その使用法を示すためにコーディング例を提供したいと思います:

/**
 * Adds a filter on DB Table Query if value is defined. Example:
 *
 * {code}
 * val startIncluded: Option[Timestamp] = _
 * tableQuery.filter(startIncluded)(startTime => _.start >= startTime)
 * {code}
 *
 * ... other doc ...
 */
def filter (value: Option[T])(condition: T => Table => Option[Boolean]) = {

javadoc と同様に、@codeが使用されます。

4

1 に答える 1