Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scala 可以引用函数';文档文本中的参数?_Scala_Scaladoc - Fatal编程技术网

Scala 可以引用函数';文档文本中的参数?

Scala 可以引用函数';文档文本中的参数?,scala,scaladoc,Scala,Scaladoc,我想在文档文本中引用方法的参数, 但是我不知道怎么做。 在.NET世界中,我们使用标签 举个例子: /** 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*) = ??

我想在文档文本中引用方法的参数, 但是我不知道怎么做。
在.NET世界中,我们使用标签

举个例子:

/** 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*) = ???

Scala是如何实现的?

我认为您应该在中找到所需的一切。对“param name”进行字符串搜索。

您可以在
Scaladoc
中进行参考,类似于
Javadoc
。根据:

但是
XML
看起来很难看,不可读,更喜欢使用
{@code foo}

{@code foo}只是将“foo”格式化为代码。这不是推荐信。
{@code foo}
<code>foo</code>