docSample

syntax

class syntax extends AnyRef

Basic Scaladoc Syntax

Just like javadoc, scaladoc comments are identified by adding an extra asterisk to the start of the comment block. So:

/**
 *
 * The double astrisks up there makes everything in
 * this comment a scaladoc comment.
 *
 */



Scaladoc implements a markup language like Markdown or Textile but it is unique to scaladoc. Leading spaces and an asterisk are ignored, so an astrisk on a line by itself should be thought of as a blank line.

  •  A blank line marks a paragraph

  •  Two apostrophes for ' ' italic ' '

  •  Three apostrophes for ' ' ' bold ' ' '

  •  Two underbars for _ _ underline _ _

  •  A single backtick for a `monospace font`

  •  A link is made with two square brackets:

      [[docSample.subCode]] becomes an internal link, subCode

      [[http://scala-lang.org Link to the Scala Language]] becomes
      an external link, Link to the Scala Language

  •  A single equal sign, like =heading=, on a line by itself makes a heading.
      Extra == makes sub headings

  •  A block of code is marked with {{{ on the first line by itself and then }}} on the last line

  •  Four hyphens following a blank line makes a horizontal rule


  1. A space and a 1. becomes an ordered list, a., A., i., or I. can be used instead
  2.   (the 1 and the dot are important, don't use a 2 for the second item)
  3.  

HTML can be inserted into text

   <br> forces a new line

   &nbsp; forces insertion of a space character

   Unicode characters can be inserted, for example &#9816; becomes ♘

   Entity References can be inserted, like &uarr; becomes ↑


Using an HTML tag like,
     <img src="..\doc-resources\image.png" alt="flowchart drawing" >
you can insert an image or SVG into your document.

example of a flowchart image

See also

Official Scaladoc Page
Spewak's Scala Style Guide

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. syntax
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new syntax ()

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def aMethod [T] (x: Int, y: Int): Boolean

    @Tags for a method call

    @Tags for a method call

    The following scaladoc comment:

    /**
     * @since 1.5
     * @tparam T A type of some sort
     * @param x The vertical argument
     * @param y The horizontal argument
     * @return False because this is an example
     * @throws IllegalArgumentException If argument(s) less than zero
     *         may not display in your current version
     * @example aMethod(-1, 2)
     */
    

    results in:

    T

    A type of some sort

    x

    The vertical argument

    y

    The horizontal argument

    returns

    False because this is an example

    Annotations
    @throws( classOf[IllegalArgumentException] )
    Example:
    1. aMethod(-1, 2)

    Since

    1.5

  7. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  8. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  10. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  13. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  14. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  15. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  16. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  17. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  18. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  19. def toString (): String

    Definition Classes
    AnyRef → Any
  20. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  21. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  22. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def aOldMethod (x: Int, y: Int): Boolean

    @Tags for a deprecated method call

    @Tags for a deprecated method call

    The following scaladoc comment:

    /**
     * @deprecated Use [[docSample.syntax.aMethod]] instead
     * @param x The vertical argument
     * @param y The horizontal argument
     * @return False because this is an example
     * @throws IllegalArgumentException If argument(s) less than zero
     *         may not display in your current version
     */
    

    results in:

    x

    The vertical argument

    y

    The horizontal argument

    returns

    False because this is an example

    Deprecated

    Use docSample.syntax.aMethod instead

Inherited from AnyRef

Inherited from Any