11

What is the exact syntax of using @See scaladoc? How do I reference:

  • a method in the same class
  • another class
  • an "http" reference

?

VasiliNovikov
  • 9,681
  • 4
  • 44
  • 62

1 Answers1

10

The syntax is the same as with any other part of the scaladoc. You basically add the @see notation, and then write pure text describing the reference. Examples:

  • @see [[method]]
  • @see [[YourCurrentClass.method]]
  • @see [[YourCurrentClass]]
  • @see See [[scala.concurrent.Future]] for more
  • @see See [[http://example.com the full documentation]] on possible values of ABC

EDIT:

official documentation on @see: https://docs.scala-lang.org/overviews/scaladoc/for-library-authors.html#usage-tags

official documentation on references in general: https://docs.scala-lang.org/overviews/scaladoc/for-library-authors.html#markup

VasiliNovikov
  • 9,681
  • 4
  • 44
  • 62
  • @GamingFelix it's a thing explicitly encouraged by StackOverflow, see: https://stackoverflow.blog/2011/07/01/its-ok-to-ask-and-answer-your-own-questions/ – VasiliNovikov Dec 19 '18 at 12:23
  • 2
    It's also quite useful. For example, one of my QA-s got about 50 upvotes, 15 bookmarks and 25k views -- hopefully useful for people. I also sometimes enjoy other people-s QA, if they pop up from search. – VasiliNovikov Dec 19 '18 at 12:26
  • Alright, fair enough. Just seemed like a very easy question that could be found in the documentation. https://docs.scala-lang.org/style/scaladoc.html – GamingFelix Dec 19 '18 at 12:44
  • 1
    @GamingFelix more specifically, https://docs.scala-lang.org/overviews/scaladoc/for-library-authors.html#usage-tags – James Whiteley Dec 19 '18 at 16:06
  • @VasyaNovikov I guess you learn something new everyday. I'll try it in the future. I'm still new to StackOverflow. I'd also suggest you include James Whiteley 's answer. – GamingFelix Dec 19 '18 at 16:10