scalascaladoc

Is is possible to reference function's parameter in the documention text?


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?


Solution

  • 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.