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
Source
CompilationUnits.scala
Linear Supertypes
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. All

Instance Constructors

  1. new CompilationUnit(source: SourceFile)

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 defined: HashSet[Global.Symbol]
  4. def depends: HashSet[Global.Symbol]
  5. def exists: Boolean
  6. def firstXmlPos: Global.Position

    Position of first XML literal in this unit.

  7. implicit val fresh: FreshNameCreator

    the fresh name creator

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

    Does this unit contain XML?

  11. val icode: LinkedHashSet[IClass]

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

  12. lazy val isJava: Boolean

    Is this about a .java source file?

  13. def position(pos: Int): Position
  14. val source: SourceFile
    Definition Classes
    CompilationUnit → CompilationUnitContextApi
  15. 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.

  16. val toCheck: ListBuffer[() ⇒ Unit]

    things to check at end of compilation unit

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

    Synthetic definitions generated by namer, eliminated by typer.

Deprecated Value Members

  1. final def comment(pos: Global.Position, msg: String): Unit
    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.2) This method will be removed. It does nothing.

  2. final def deprecationWarning(pos: Global.Position, msg: String, since: String): Unit
    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.2) Call global.currentRun.reporting.deprecationWarning directly instead.

  3. final def echo(pos: Global.Position, msg: String): Unit
    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.2) Call global.reporter.echo directly instead.

  4. final def error(pos: Global.Position, msg: String): Unit
    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.2) Call global.reporter.error (or typer.context.error) directly instead.

  5. final def uncheckedWarning(pos: Global.Position, msg: String): Unit
    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.2) Call global.currentRun.reporting.uncheckedWarning directly instead.

  6. final def warning(pos: Global.Position, msg: String): Unit
    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.2) Call global.reporter.warning (or typer.context.warning) directly instead.