Packages

class CompilationUnit extends Global.CompilationUnitContextApi

One unit of compilation that has been submitted to the compiler. It typically corresponds to a single file of source code. It includes error-reporting hooks.

Self Type
Global.CompilationUnit
Annotations
@nowarn()
Source
CompilationUnits.scala
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CompilationUnit
  2. CompilationUnitContextApi
  3. AnyRef
  4. 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 CompilationUnit(source: SourceFile)
  2. new CompilationUnit(source: SourceFile, freshNameCreator: FreshNameCreator)

Value Members

  1. var body: Global.Tree

    the content of the compilation unit in tree form

    the content of the compilation unit in tree form

    Definition Classes
    CompilationUnit → CompilationUnitContextApi
  2. var checkedFeatures: Set[Global.Symbol]

    The features that were already checked for this unit

  3. def exists: Boolean
  4. def firstXmlPos: Global.Position

    Position of first XML literal in this unit.

  5. implicit val fresh: FreshNameCreator

    the fresh name creator

  6. def freshTermName(prefix: String = nme.FRESH_TERM_NAME_PREFIX): Global.TermName
  7. def freshTypeName(prefix: String): Global.TypeName
  8. def hasXml: Boolean

    Does this unit contain XML?

  9. val icode: LinkedHashSet[IClass]

    For sbt compatibility (https://github.com/scala/scala/pull/4588)

  10. val isJava: Boolean

    Is this about a .java source file?

  11. def position(pos: Int): Position
  12. def registerDependency(symbol: Global.Symbol): Unit
  13. val source: SourceFile
    Definition Classes
    CompilationUnit → CompilationUnitContextApi
  14. def targetPos: Global.Position

    The position of a targeted type check If this is different from NoPosition, the type checking will stop once a tree that contains this position range is fully attributed.

  15. val toCheck: ListBuffer[() => Unit]

    things to check at end of compilation unit

  16. def toString(): String
    Definition Classes
    CompilationUnit → AnyRef → Any
  17. val transformed: AnyRefMap[Global.Tree, Global.Tree]
  18. object synthetics

    Synthetic definitions generated by namer, eliminated by typer.

Deprecated Value Members

  1. def defined: HashSet[Global.Symbol]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.12.9) Not supported

  2. def depends: HashSet[Global.Symbol]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.12.9) Not supported and no longer used by Zinc