配置scaladoc以包含扩展方法

时间:2014-01-28 12:59:41

标签: scala implicit-conversion scaladoc enrich-my-library

我是否可以通过指定隐式转换来将scaladoc配置为包含隐式转换的方法?

E.g。给定

trait Foo

object Operations {
  implicit class FooOps(val f: Foo) extends AnyVal {
    def bar = 33
  }
}

我可以在bar的文档中制作scaladoc include扩展方法Foo吗?

1 个答案:

答案 0 :(得分:0)

看起来如此(我还没试过):

% scladoc -help
Usage: scaladoc <options> <source files>
where possible scaladoc options include:
  ...
  -implicits                    Document members inherited by implicit conversions.
  -implicits-hide:<implicit(s)> Hide the members inherited by the given comma separated, fully qualified implicit conversions. Add dot (.) to include default conversions.
  -implicits-show-all           Show members inherited by implicit conversions that are impossible in the default scope. (for example conversions that require Numeric[String] to be in scope)
  ...