class OutputDirs extends AnyRef
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.
- Source
- MutableSettings.scala
- Alphabetic
- By Inheritance
- OutputDirs
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new OutputDirs()
Value Members
- def add(src: AbstractFile, dst: AbstractFile): Unit
-
def
add(srcDir: String, outDir: String): Unit
Add a destination directory for sources found under
srcDir
.Add a destination directory for sources found under
srcDir
. Both directories should exist. - def getSingleOutput: Option[AbstractFile]
-
def
outputDirFor(src: AbstractFile): AbstractFile
Return the output directory for the given file.
-
def
outputs: List[(AbstractFile, AbstractFile)]
Return the list of source-destination directory pairs.
-
def
setSingleOutput(dir: AbstractFile): Unit
Set the single output directory.
Set the single output directory. From now on, all files will be dumped in there, regardless of previous calls to 'add'.
-
def
setSingleOutput(outDir: String): Unit
Set the single output directory.
Set the single output directory. From now on, all files will be dumped in there, regardless of previous calls to 'add'.
-
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.
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.
The Scala compiler and reflection APIs.