Scaladoc继承通知

Scaladoc继承通知,scala,javadoc,scaladoc,Scala,Javadoc,Scaladoc,是否可以从父类型继承scaladoc并添加自定义通知 例如: trait Parent { /** Add arbitrary number of key-value pairs to entity. */ def addFields(fields: (String, String)*): this.type } class Child extends Parent { /** * {@inheritdoc } * * @note Previou

是否可以从父类型继承scaladoc并添加自定义通知

例如:

trait Parent {
  
  /** Add arbitrary number of key-value pairs to entity. */
  def addFields(fields: (String, String)*): this.type
}

class Child extends Parent {

   /** 
    * {@inheritdoc }
    *
    * @note Previously existing keys would be overwritten 
    */
  def addFields(fields: (String, String)*): this.type = ???
}
我希望有以下scaladoc输出:

class Child extends Parent {

   /** 
    * Add arbitrary number of key-value pairs to entity.
    *
    * @note Previously existing keys would be overwritten 
    */
  def addFields(fields: (String, String)*): this.type = ???
}

实际上你已经有了解决办法。与java不同,您不需要用大括号将
@inheritardoc
包装起来。因此,以下内容将创建所需的输出:

trait双亲{
/**向实体添加任意数量的键值对*/
def addFields(字段:(字符串,字符串)*):this.type
}
类子级扩展父级{
/** 
*@doc
*
*@注意:以前存在的密钥将被覆盖
*/
覆盖def addFields(字段:(字符串,字符串)*):this.type=???
}

更多信息可通过
sbt