Dotty Documentation

0.7.0-bin-SNAPSHOT

class SymbolLoaders
extends Object

A base class for Symbol loaders with some overridable behavior

[-] Constructors

SymbolLoaders ( )

[-] Members

[+] class PackageLoader

Load contents of a package

[+] def binaryOnly ( owner: Symbol , name: String ) ( implicit ctx: Context ) : Boolean

The package objects of scala and scala.reflect should always be loaded in binary if classfiles are available, even if sourcefiles are newer. Late-compiling these objects from source leads to compilation order issues. Note: We do a name-base comparison here because the method is called before we even have ReflectPackage defined.

[+] def enterClass ( owner: Symbol , name: PreName , completer: SymbolLoader , flags: FlagSet , scope: Scope ) ( implicit ctx: Context ) : Symbol

Enter class with given name into scope of owner.

[+] def enterClassAndModule ( owner: Symbol , name: PreName , completer: SymbolLoader , flags: FlagSet , scope: Scope ) ( implicit ctx: Context ) : Unit

Enter class and module with given name into scope of owner and give them completer as type.

[+] def enterModule ( owner: Symbol , name: PreName , completer: SymbolLoader , modFlags: FlagSet , clsFlags: FlagSet , scope: Scope ) ( implicit ctx: Context ) : Symbol

Enter module with given name into scope of owner.

[+] protected def enterNew ( owner: Symbol , member: Symbol , completer: SymbolLoader , scope: Scope ) ( implicit ctx: Context ) : Symbol
[+] def enterPackage ( owner: Symbol , pname: TermName , completer: (TermSymbol, ClassSymbol) => PackageLoader ) ( implicit ctx: Context ) : Symbol

Enter package with given name into scope of owner and give them completer as type.

[+] def enterToplevelsFromSource ( owner: Symbol , name: PreName , src: AbstractFile , scope: Scope ) ( implicit ctx: Context ) : Unit

If setting -scansource is set: Enter all toplevel classes and objects in file src into package owner, provided they are in the right package. Issue a warning if a class or object is in the wrong package, i.e. if the file path differs from the declared package clause. If -scansource is not set: Enter class and module with given name into scope of owner.

All entered symbols are given a source completer of src as info.

[+] def initializeFromClassPath ( owner: Symbol , classRep: ClassRepresentation ) ( implicit ctx: Context ) : Unit

Initialize toplevel class and module symbols in owner from class path representation classRep

[+] def needCompile ( bin: AbstractFile , src: AbstractFile ) : Boolean