How to use @See scaladoc?
Asked Answered
R

1

12

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

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

?

Rabblerouser answered 19/12, 2018 at 12:5 Comment(0)
R
11

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

Rabblerouser answered 19/12, 2018 at 12:5 Comment(5)
@GamingFelix it's a thing explicitly encouraged by StackOverflow, see: stackoverflow.blog/2011/07/01/…Rabblerouser
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.Rabblerouser
Alright, fair enough. Just seemed like a very easy question that could be found in the documentation. docs.scala-lang.org/style/scaladoc.htmlWrist
@Wrist more specifically, docs.scala-lang.org/overviews/scaladoc/…Barajas
@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.Wrist

© 2022 - 2024 — McMap. All rights reserved.