在 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]) = {
就像在 javadocs 中一样,使用了@code。