abstract class Mapper extends AnyRef
- Alphabetic
- By Inheritance
- Mapper
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Mapper()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
abs: FileMap
Pairs a File with the absolute File obtained by calling
getAbsoluteFile
.Pairs a File with the absolute File obtained by calling
getAbsoluteFile
. Note that this usually means that relative files are resolved against the current working directory. -
def
allSubpaths(base: File): Traversable[(File, String)]
Selects all descendants of
base
directory and maps them to a path relative tobase
.Selects all descendants of
base
directory and maps them to a path relative tobase
.base
itself is not included. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
basic: PathMap
A path mapper that pairs a File with the path returned by calling
getPath
on it. -
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
contentOf(baseDirectory: File): Seq[(File, String)]
return a Seq of mappings excluding the directory itself.
return a Seq of mappings excluding the directory itself.
- baseDirectory
The directory that should be turned into a mappings sequence.
- returns
mappings - The
basicDirectory
's contents exlcudingbasicDirectory
itself
In order to create mappings for a static directory "extra" add
mappings ++= contentOf(baseDirectory.value / "extra")
The resulting mappings sequence will look something like this
File(baseDirectory/extras/file1) -> "file1" File(baseDirectory/extras/file2) -> "file2" ...
, Add a static directory "extra" and re-map the destination to a different path
mappings ++= contentOf(baseDirectory.value / "extra").map { case (src, destination) => src -> s"new/path/destination" }
Examples: -
def
directory(baseDirectory: File): Seq[(File, String)]
return a Seq of mappings which effect is to add a whole directory in the generated package
return a Seq of mappings which effect is to add a whole directory in the generated package
- baseDirectory
The directory that should be turned into a mappings sequence.
- returns
mappings The
baseDirectory
and all of its contents
In order to create mappings for a static directory "extra" add
mappings ++= directory(baseDirectory.value / "extra")
The resulting mappings sequence will look something like this
File(baseDirectory/extras) -> "extras" File(baseDirectory/extras/file1) -> "extras/file1" File(baseDirectory/extras/file2) -> "extras/file2" ...
Example: -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fail: (Any) ⇒ Nothing
A mapper that throws an exception for any input.
A mapper that throws an exception for any input. This is useful as the last mapper in a pipeline to ensure every input gets mapped.
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flat(newDirectory: File): FileMap
Constructs a FileMap that pairs a file with a file with the same name in
newDirectory
.Constructs a FileMap that pairs a file with a file with the same name in
newDirectory
. For example, ifnewDirectory
is/a/b
, then/r/s/t/d.txt
will be paired with/a/b/d.txt
-
val
flat: PathMap
A path mapper that pairs a File with its name.
A path mapper that pairs a File with its name. For example,
/x/y/z.txt
gets paired withz.txt
. -
def
flatRebase(newBase: String): PathMap
A path mapper that pairs a File with a path constructed from
newBase
and the file's name.A path mapper that pairs a File with a path constructed from
newBase
and the file's name. For example, ifnewBase = /new/a/
, then/old/x/z.txt
gets paired with/new/a/z.txt
. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def normalizeBase(base: String): String
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
rebase(oldBase: File, newBase: File): FileMap
Produces a File mapper that pairs a descendant of
oldBase
with a file innewBase
that preserving the relative path of the original file againstoldBase
.Produces a File mapper that pairs a descendant of
oldBase
with a file innewBase
that preserving the relative path of the original file againstoldBase
. For example, ifoldBase
is/old/x/
andnewBase
is/new/a/
,/old/x/y/z.txt
gets paired with/new/a/y/z.txt
. - def rebase(oldBases: Iterable[File], newBase: File, zero: FileMap = transparent): FileMap
-
def
rebase(oldBase: File, newBase: String): PathMap
A path mapper that pairs a descendent of
oldBase
withnewBase
prepended to the path relative tooldBase
.A path mapper that pairs a descendent of
oldBase
withnewBase
prepended to the path relative tooldBase
. For example, ifoldBase = /old/x/
andnewBase = new/a/
, then/old/x/y/z.txt
gets paired withnew/a/y/z.txt
. - def relativeTo(bases: Iterable[File], zero: PathMap = transparent): PathMap
-
def
relativeTo(base: File): PathMap
A path mapper that pairs a File with its path relative to
base
.A path mapper that pairs a File with its path relative to
base
. If the File is not a descendant ofbase
, it is not handled (None is returned by the mapper). -
def
resolve(newDirectory: File): FileMap
Returns a FileMap that resolves a relative File against
newDirectory
and pairs the original File with the resolved File.Returns a FileMap that resolves a relative File against
newDirectory
and pairs the original File with the resolved File. The mapper ignores absolute files. -
def
selectSubpaths(base: File, filter: FileFilter): Traversable[(File, String)]
Selects descendants of
base
directory matchingfilter
and maps them to a path relative tobase
.Selects descendants of
base
directory matchingfilter
and maps them to a path relative tobase
.base
itself is not included. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
total[A, B](f: (A) ⇒ B): (A) ⇒ Some[B]
A mapper that is defined on all inputs by the function
f
. -
def
transparent: (Any) ⇒ Option[Nothing]
A mapper that ignores all inputs.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()