Dotty Documentation

0.4.0-bin-SNAPSHOT

class OutputDirs

A class for holding mappings from source directories to their output location. This functionality can be accessed only programmatically. The command line compiler uses a single output location, but tools may use this functionality to set output location per source directory.

[-] Constructors

OutputDirs ( )

[-] Members

[+] private var outputDirs : List [ ( AbstractFile, AbstractFile ) ]

Pairs of source directory - destination directory.

[+] private var singleOutDir : Option [ AbstractFile ]

If this is not None, the output location where all classes should go.

[+] def add ( srcDir: String , outDir: String ) : Unit

Add a destination directory for sources found under srcdir. Both directories should exits.

[+] def add ( src: AbstractFile , dst: AbstractFile ) : Unit
[+] private def checkDir ( dir: AbstractFile , name: String , allowJar: Boolean ) : AbstractFile

Check that dir is exists and is a directory.

[+] def getSingleOutput : Option [ AbstractFile ]
[+] def outputDirFor ( src: AbstractFile ) : AbstractFile

Return the output directory for the given file.

[+] private def outputDirs_= ( x$1: List [ ( AbstractFile, AbstractFile ) ] ) : Unit

Pairs of source directory - destination directory.

[+] def outputs : List [ ( AbstractFile, AbstractFile ) ]

Return the list of source-destination directory pairs.

[+] def setSingleOutput ( outDir: String ) : Unit

Set the single output directory. From now on, all files will be dumped in there, regardless of previous calls to 'add'.

[+] def setSingleOutput ( dir: AbstractFile ) : Unit

Set the single output directory. From now on, all files will be dumped in there, regardless of previous calls to 'add'.

[+] private def singleOutDir_= ( x$1: Option [ AbstractFile ] ) : Unit

If this is not None, the output location where all classes should go.

[+] def srcFilesFor ( classFile: AbstractFile , srcPath: String ) : List [ AbstractFile ]

Return the source file path(s) which correspond to the given classfile path and SourceFile attribute value, subject to the condition that source files are arranged in the filesystem according to Java package layout conventions.

The given classfile path must be contained in at least one of the specified output directories. If it does not then this method returns Nil.

Note that the source file is not required to exist, so assuming a valid classfile path this method will always return a list containing at least one element.

Also that if two or more source path elements target the same output directory there will be two or more candidate source file paths.