问题
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