5

I woul like to reference method's parameters in the documentation text, but have no idea how to do it.
In .NET world we use tag paramref

Just as an example:

/** Send email with the specified @paramref body to the addesses given in @paramref to.
@param body Just a plain text or teamplate-aware text.*/ 
def SendEmail(body: EmailBody, to: EmailAddress*) = ???

How is it done in Scala?

Pavel Voronin
  • 13,503
  • 7
  • 71
  • 137

2 Answers2

1

You can make reference in Scaladoc similarly to Javadoc. According to the documentation for javadocs:

{@code foo}

and

<code>foo</code>

But XML looks ugly and not readable, prefer to use {@code foo} instead.

-4

I think you should find everything you need in https://docs.scala-lang.org/style/scaladoc.html. Do a string search for "param name".

Prasad Rao
  • 21
  • 1