How to reference the name of a val in a Object class in scaladoc?

时光毁灭记忆、已成空白 提交于 2020-12-08 06:01:11

问题


Is there a way that I can reference the name of a val in a Object class using scaladoc, similar to

{@value #STATIC_FIELD} 

in javadoc.


回答1:


you can do it two ways:

package your.package_path


object SomeObject extends App {

  val someList: List[Int] = List.empty[Int]

  /**
   * @see [[your.package_path.SomeObject#someList]]
   * @see [[someList]]
   * ...
   */
  def bar(): String = ???
}


来源:https://stackoverflow.com/questions/29854895/how-to-reference-the-name-of-a-val-in-a-object-class-in-scaladoc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!