summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/doc/model/comment/Comment.scala
blob: 1476af7de8c0bc3885a529a7ea5ce7020dbdd658 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* NSC -- new Scala compiler -- Copyright 2007-2010 LAMP/EPFL */

package scala.tools.nsc
package doc
package model
package comment

import scala.collection._

/** A Scaladoc comment and all its tags.
  *
  * '''Note:''' the only instantiation site of this class is in `Parser`.
  *
  * @author Gilles Dubochet
  * @author Manohar Jonnalagedda */
abstract class Comment {

  /** */
  def body: Body
  /* author|deprecated|param|return|see|since|throws|version|todo|tparam */

  /** */
  def authors: List[Body]

  /** */
  def see: List[Body]

  /** */
  def result: Option[Body]

  /** */
  def throws: Map[String, Body]

  /** */
  def valueParams: Map[String, Body]

  /** */
  def typeParams: Map[String, Body]

  /** */
  def version: Option[Body]

  /** */
  def since: Option[Body]

  /** */
  def todo: List[Body]

  /** */
  def deprecated: Option[Body]

  override def toString =
    body.toString + "\n" +
    (authors map ("@author " + _.toString)).mkString("\n") +
    (result map ("@return " + _.toString)).mkString

}