Dotty Documentation

0.6.0-bin-SNAPSHOT

trait DirectoryLookup [ FileEntryType ]
extends Object with ClassPath

A trait allowing to look for classpath entries in directories. It provides common logic for classes handling class and source files. It makes use of the fact that in the case of nested directories it's easy to find a file when we have a name of a package. It abstracts over the file representation to work with both JFile and AbstractFile.

[-] Constructors

[-] Members

[+] type F =
[+] val dir : F
[+] protected def createFileEntry ( file: AbstractFile ) : FileEntryType
[+] protected def emptyFiles : Array [ F ]
[+] protected def files ( inPackage: String ) : Seq [ FileEntryType ]
[+] private def getDirectory ( forPackage: String ) : Option [ F ]
[+] protected def getName ( f: F ) : String
[+] protected def getSubDir ( dirName: String ) : Option [ F ]
[+] override def hasPackage ( pkg: String ) : Boolean
[+] protected def isMatchingFile ( f: F ) : Boolean
[+] protected def isPackage ( f: F ) : Boolean
[+] def list ( inPackage: String ) : ClassPathEntries

Returns packages and classes (source or classfile) that are members of inPackage (not recursively). The inPackage string is a full package name, e.g., "scala.collection".

This is the main method uses to find classes, see class PackageLoader. The rootMirror.rootLoader is created with inPackage = "".

[+] protected def listChildren ( dir: F , filter: Option [ F => Boolean ] ) : Array [ F ]
[+] def packages ( inPackage: String ) : Seq [ PackageEntry ]
[+] protected def toAbstractFile ( f: F ) : AbstractFile