Scala Compiler2.13.9 < Back


# Packages

-  package root

  The Scala compiler and reflection APIs.

  The Scala compiler and reflection APIs.

  Definition Classes
    root
-  package scala
  Definition Classes
    root
-  package tools
  Definition Classes
    scala
-  package nsc
  Definition Classes
    tools
-  package doc
  Definition Classes
    nsc
-  package model
  Definition Classes
    doc
-  package diagram
  Definition Classes
    model
- AbstractType
- AliasType
- Annotation
- AnnotationClass
- BoundedTypeParamConstraint
- Class
- CommentFactory
- Constraint
- Constructor
- Def
- DocTemplateEntity
- Entity
- EqualTypeParamConstraint
- HigherKinded
- ImplicitConversion
- ImplicitInScopeConstraint
- ImplicitMemberShadowing
- IndexModelFactory
- KnownTypeClassConstraint
- LowerBoundedTypeParamConstraint
- MemberEntity
- MemberLookup
- MemberTemplateEntity
- ModelFactory
- ModelFactoryImplicitSupport
- ModelFactoryTypeSupport
- NoDocTemplate
- NonTemplateMemberEntity
- Object
- Package
- ParameterEntity
- PrivateInInstance
- PrivateInTemplate
- ProtectedInInstance
- ProtectedInTemplate
- Public
- RootPackage
- TemplateEntity
- Trait
- TreeEntity
- TreeFactory
- TypeClassConstraint
- TypeEntity
- TypeParam
- TypeParamConstraint
- UpperBoundedTypeParamConstraint
- Val
- ValueArgument
- ValueParam
- Visibility

c

scala.tools.nsc.doc.model

# ModelFactory

###
Companion object ModelFactory

#### class ModelFactory extends AnyRef

This trait extracts all required information for documentation from compilation units

Self Type
  ModelFactory with ModelFactoryImplicitSupport with ModelFactoryTypeSupport with DiagramFactory with CommentFactory with TreeFactory with MemberLookup
Source
  ModelFactory.scala

Linear Supertypes
AnyRef, Any
Type Hierarchy

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. ModelFactory
2. AnyRef
3. Any

Implicitly

1. by any2stringadd
2. by StringFormat
3. by Ensuring
4. by ArrowAssoc

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### Instance Constructors

1.  new ModelFactory(global: Global, settings: Settings)

### Type Members

1.  abstract class DocTemplateImpl extends (ModelFactory.this)#MemberTemplateImpl with DocTemplateEntity

   The instantiation of `TemplateImpl` triggers the creation of the following entities: All ancestors of the template and all non-package members.

2.  abstract class EntityImpl extends Entity
3.  trait HigherKindedImpl extends HigherKinded
4.  abstract class MemberImpl extends (ModelFactory.this)#EntityImpl with MemberEntity
5.  abstract class MemberTemplateImpl extends (ModelFactory.this)#MemberImpl with (ModelFactory.this)#TemplateImpl with (ModelFactory.this)#HigherKindedImpl with MemberTemplateEntity

   An inherited template that was not documented in its original owner - example: in classpath: trait T { class C } -- T (and implicitly C) are not documented in the source: trait U extends T -- C appears in U as a MemberTemplateImpl -- that is, U has a member for it but C doesn't get its own page

6.  class NoDocTemplateImpl extends (ModelFactory.this)#EntityImpl with (ModelFactory.this)#TemplateImpl with (ModelFactory.this)#HigherKindedImpl with NoDocTemplate

   A template that is not documented at all.

   A template that is not documented at all. The class is instantiated during lookups, to indicate that the class exists, but should not be documented (either it's not included in the source or it's not visible)

7.  abstract class NonTemplateMemberImpl extends (ModelFactory.this)#MemberImpl with NonTemplateMemberEntity
8.  abstract class NonTemplateParamMemberImpl extends (ModelFactory.this)#NonTemplateMemberImpl
9.  abstract class PackageImpl extends (ModelFactory.this)#DocTemplateImpl with Package
10.  abstract class ParameterImpl extends ParameterEntity
11.  abstract class RootPackageImpl extends (ModelFactory.this)#PackageImpl with RootPackage
12.  trait TemplateImpl extends (ModelFactory.this)#EntityImpl with TemplateEntity

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##: Int
   Definition Classes
     AnyRef → Any
3.  def +(other: String): String
   Implicit
     This member is added by an implicit conversion from ModelFactory toany2stringadd[ModelFactory] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd
4.  def ->[B](y: B): (ModelFactory, B)
   Implicit
     This member is added by an implicit conversion from ModelFactory toArrowAssoc[ModelFactory] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()
5.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
6.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
7.  def clone(): AnyRef
   Attributes
     protected[lang]
   Definition Classes
     AnyRef
   Annotations
     @throws(classOf[java.lang.CloneNotSupportedException]) @native()
8.  val docTemplatesCache: LinkedHashMap[Global.Symbol, (ModelFactory.this)#DocTemplateImpl]
   Attributes
     protected
9.  def ensuring(cond: (ModelFactory) => Boolean, msg: => Any): ModelFactory
   Implicit
     This member is added by an implicit conversion from ModelFactory toEnsuring[ModelFactory] performed by method Ensuring in scala.Predef.
   Definition Classes
     Ensuring
10.  def ensuring(cond: (ModelFactory) => Boolean): ModelFactory
    Implicit
      This member is added by an implicit conversion from ModelFactory toEnsuring[ModelFactory] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
11.  def ensuring(cond: Boolean, msg: => Any): ModelFactory
    Implicit
      This member is added by an implicit conversion from ModelFactory toEnsuring[ModelFactory] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
12.  def ensuring(cond: Boolean): ModelFactory
    Implicit
      This member is added by an implicit conversion from ModelFactory toEnsuring[ModelFactory] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
13.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
14.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
15.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
16.  def findMember(aSym: Global.Symbol, inTpl: (ModelFactory.this)#DocTemplateImpl): Option[(ModelFactory.this)#MemberImpl]
17.  def findTemplateMaybe(aSym: Global.Symbol): Option[(ModelFactory.this)#DocTemplateImpl]
18.  final def getClass(): java.lang.Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
19.  val global: Global
20.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
21.  var ids: Int
22.  def implicitExcluded(convertorMethod: String): Boolean
23.  def inOriginalOwner(aSym: Global.Symbol, inTpl: (ModelFactory.this)#TemplateImpl): Boolean
24.  def isEmptyJavaObject(aSym: Global.Symbol): Boolean
25.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
26.  def localShouldDocument(aSym: Global.Symbol): Boolean
27.  def makeAnnotation(annot: Global.AnnotationInfo): Annotation
28.  def makeMember(aSym: Global.Symbol, conversion: Option[(ModelFactory.this)#ImplicitConversionImpl], inTpl: (ModelFactory.this)#DocTemplateImpl): List[(ModelFactory.this)#MemberImpl]
29.  def makeModel: Option[Universe]
30.  def makeParentTypes(aType: Global.Type, tpl: Option[(ModelFactory.this)#MemberTemplateImpl], inTpl: (ModelFactory.this)#TemplateImpl): List[(TemplateEntity, TypeEntity)]

    Get the types of the parents of the current class, ignoring the refinements

31.  def makeQualifiedName(sym: Global.Symbol, relativeTo: Option[Global.Symbol] = None): String
32.  def makeTemplate(aSym: Global.Symbol, inTpl: Option[(ModelFactory.this)#TemplateImpl]): (ModelFactory.this)#TemplateImpl
33.  def makeTemplate(aSym: Global.Symbol): (ModelFactory.this)#TemplateImpl
34.  def makeTypeInTemplateContext(aType: Global.Type, inTpl: (ModelFactory.this)#TemplateImpl, dclSym: Global.Symbol): TypeEntity

35.  def makeTypeParam(aSym: Global.Symbol, inTpl: (ModelFactory.this)#TemplateImpl): TypeParam

36.  def makeValueParam(aSym: Global.Symbol, inTpl: (ModelFactory.this)#DocTemplateImpl, newName: String): ValueParam

37.  def makeValueParam(aSym: Global.Symbol, inTpl: (ModelFactory.this)#DocTemplateImpl): ValueParam

38.  def membersShouldDocument(sym: Global.Symbol, inTpl: (ModelFactory.this)#TemplateImpl): Boolean
39.  def modelFinished: Boolean
40.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
41.  val noDocTemplatesCache: LinkedHashMap[Global.Symbol, (ModelFactory.this)#NoDocTemplateImpl]
    Attributes
      protected
42.  def normalizeTemplate(aSym: Global.Symbol): Global.Symbol

    This method makes it easier to work with the different kinds of symbols created by scalac by stripping down the package object abstraction and placing members directly in the package.

    This method makes it easier to work with the different kinds of symbols created by scalac by stripping down the package object abstraction and placing members directly in the package.

    Here's the explanation of what we do. The code:

        package foo {
          object `package` {
            class Bar
          }
        }

    will yield this Symbol structure:

                                              +---------+ (2)
                                              |         |
        +---------------+         +---------- v ------- | ---+                              +--------+ (2)
        | package foo#1 <---(1)---- module class foo#2  |    |                              |        |
        +---------------+         | +------------------ | -+ |         +------------------- v ---+   |
                                  | | package object foo#3 <-----(1)---- module class package#4  |   |
                                  | +----------------------+ |         | +---------------------+ |   |
                                  +--------------------------+         | | class package$Bar#5 | |   |
                                                                       | +----------------- | -+ |   |
                                                                       +------------------- | ---+   |
                                                                                            |        |
                                                                                            +--------+

    (1) sourceModule (2) you get out of owners with .owner

    and normalizeTemplate(Bar.owner) will get us the package, instead of the module class of the package object.

43.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
44.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
45.  def optimize(str: String): String
46.  def packageDropped(tpl: (ModelFactory.this)#DocTemplateImpl): Boolean
47.  val settings: Settings
48.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
49.  def templateShouldDocument(aSym: Global.Symbol, inTpl: (ModelFactory.this)#DocTemplateImpl): Boolean
50.  def templatesCount: Int
51.  def toString(): String
    Definition Classes
      AnyRef → Any
52.  def typeShouldDocument(bSym: Global.Symbol, inTpl: (ModelFactory.this)#DocTemplateImpl): Boolean
53.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
54.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
55.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()
56.  object modelCreation

    These are all model construction methods.

    These are all model construction methods. Please do not use them directly, they are calling each other recursively starting from makeModel. On the other hand, makeTemplate, makeAnnotation, makeMember, makeType should only be used after the model was created (modelFinished=true) otherwise assertions will start failing.

### Deprecated Value Members

1.  def formatted(fmtstr: String): String
   Implicit
     This member is added by an implicit conversion from ModelFactory toStringFormat[ModelFactory] performed by method StringFormat in scala.Predef.
   Definition Classes
     StringFormat
   Annotations
     @deprecated @inline()
   Deprecated

     (Since version 2.12.16) Use `formatString.format(value)` instead of `value.formatted(formatString)`, or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters.

2.  def →[B](y: B): (ModelFactory, B)
   Implicit
     This member is added by an implicit conversion from ModelFactory toArrowAssoc[ModelFactory] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @deprecated
   Deprecated

     (Since version 2.13.0) Use `->` instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion any2stringadd fromModelFactory to any2stringadd[ModelFactory]

### Inherited by implicit conversion StringFormat fromModelFactory to StringFormat[ModelFactory]

### Inherited by implicit conversion Ensuring fromModelFactory to Ensuring[ModelFactory]

### Inherited by implicit conversion ArrowAssoc fromModelFactory to ArrowAssoc[ModelFactory]

### Ungrouped