© Toby Weston 2018
Toby WestonScala for Java Developershttps://doi.org/10.1007/978-1-4842-3108-1_5

5. ScalaDoc

Toby Weston
(1)
London, UK
 
Scala has ported the idea of JavaDoc and creatively called it ScalaDoc . Adding ScalaDoc to your Scala source works similarly to adding JavaDoc, and is done with markup in comments (see Figure 5-1). For example, the following fragment in source code
  /** Returns `true` if this value is equal to x, `false` otherwise. **/
  def ==(x: Byte): Boolean
…can be turned into the following fragment in HTML :
A456960_1_En_5_Fig1_HTML.jpg
Figure 5-1
Embedded ScalaDoc markup gets rendered in HTML
To see the documentation for the Scala Library API, head ...

Get Scala for Java Developers: A Practical Primer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.