How to disambiguate links to methods in scaladoc?

后端 未结 4 1475
梦谈多话
梦谈多话 2021-02-03 19:57

I\'m documenting a Scala class with overloaded methods. How can I distinguish them when referring to them in scaladoc comments? For example, if I have

/**
 * The         


        
4条回答
  •  猫巷女王i
    2021-02-03 20:32

    What I found very usefull in IntelliJ is right clicking on a method you would like to put in [[ ]] and choosing "Copy reference".

    Steps:

    1. You find a method you'd like to reference somewhere else.

    1. You right click on the method name and choose "Copy reference".

    1. You paste it in [[ ]] in your documentation (and write a label of your choice next to it, e.g. "apply(String)").

    1. Voilà.

提交回复
热议问题