summaryrefslogtreecommitdiff
path: root/src/scaladoc/scala/tools/nsc/doc/html/Doclet.scala
blob: 73a854e995034b65d2bcdaab8f3dd3c968f67d29 (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
/* NSC -- new Scala compiler
 * Copyright 2007-2013 LAMP/EPFL
 * @author  David Bernard, Manohar Jonnalagedda
 */

package scala.tools.nsc
package doc
package html

import scala.reflect.internal.Reporter
import doclet._

/** The default doclet used by the scaladoc command line tool
  * when no user-provided doclet is provided. */
class Doclet(reporter: Reporter) extends Generator with Universer {

  @deprecated("Doclets should be created with the Reporter constructor. Otherwise logging reporters will not be shared by the creating parent", "2.12.0")
  def this() = this(null)

  def generateImpl() =
    new html.HtmlFactory(
      universe,
      if (reporter != null) reporter else new ScalaDocReporter(universe.settings)
    ).generate()
}