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
- Alphabetic
- By Inheritance
- CompilationUnit
- CompilationUnitContextApi
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new CompilationUnit(source: SourceFile)
- new CompilationUnit(source: SourceFile, freshNameCreator: FreshNameCreator)
Value Members
- 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
- var checkedFeatures: Set[Global.Symbol]
The features that were already checked for this unit
- def exists: Boolean
- def firstXmlPos: Global.Position
Position of first XML literal in this unit.
- implicit val fresh: FreshNameCreator
the fresh name creator
- def freshTermName(prefix: String = nme.FRESH_TERM_NAME_PREFIX): Global.TermName
- def freshTypeName(prefix: String): Global.TypeName
- def hasXml: Boolean
Does this unit contain XML?
- val icode: LinkedHashSet[IClass]
For sbt compatibility (https://github.com/scala/scala/pull/4588)
- val isJava: Boolean
Is this about a .java source file?
- def position(pos: Int): Position
- def registerDependency(symbol: Global.Symbol): Unit
- val source: SourceFile
- Definition Classes
- CompilationUnit → CompilationUnitContextApi
- 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.
- val toCheck: ListBuffer[() => Unit]
things to check at end of compilation unit
- def toString(): String
- Definition Classes
- CompilationUnit → AnyRef → Any
- val transformed: AnyRefMap[Global.Tree, Global.Tree]
- object synthetics
Synthetic definitions generated by namer, eliminated by typer.
Deprecated Value Members
- def defined: HashSet[Global.Symbol]
- Annotations
- @deprecated
- Deprecated
(Since version 2.12.9) Not supported
- def depends: HashSet[Global.Symbol]
- Annotations
- @deprecated
- Deprecated
(Since version 2.12.9) Not supported and no longer used by Zinc
The Scala compiler and reflection APIs.