diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-18 00:59:36 +0000 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-18 00:59:36 +0000 |
commit | 632f3d0340f66977fd59bb8d0a601a430dd3d0f5 (patch) | |
tree | 8d36a536f0a28fb31534e6fab514fcd4d50054cf /stage1/ClassPath.scala | |
parent | 86552d373be1b2fbf3e11d1ed223ebc4bdb6b280 (diff) | |
download | cbt-632f3d0340f66977fd59bb8d0a601a430dd3d0f5.tar.gz cbt-632f3d0340f66977fd59bb8d0a601a430dd3d0f5.tar.bz2 cbt-632f3d0340f66977fd59bb8d0a601a430dd3d0f5.zip |
simplify and add features to reflective task lookup code
Code is much simpler now.
Now cbt sub-tasks are separated by . instead of spaces to
unify the syntax with method calls Scala. Also the reflective
code now works not only on builds but any kind of values,
so zero argument members of any types of return values can
simply be called.
This is also a large step towards detangling the reflective
lookup from cbt and turning it into a fully fletched
shell to Scala "native" call solution.
Diffstat (limited to 'stage1/ClassPath.scala')
-rw-r--r-- | stage1/ClassPath.scala | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/stage1/ClassPath.scala b/stage1/ClassPath.scala index 6e6f113..d8568c2 100644 --- a/stage1/ClassPath.scala +++ b/stage1/ClassPath.scala @@ -16,7 +16,7 @@ case class ClassPath(files: Seq[File] = Seq()){ nonExisting.isEmpty, "Classpath contains entires that don't exist on disk:\n" ++ nonExisting.mkString("\n") ++ "\nin classpath:\n"++string ) - + def +:(file: File) = ClassPath(file +: files) def :+(file: File) = ClassPath(files :+ file) def ++(other: ClassPath) = ClassPath(files ++ other.files) @@ -24,5 +24,4 @@ case class ClassPath(files: Seq[File] = Seq()){ def strings = files.map{ f => f.string ++ ( if(f.isDirectory) "/" else "" ) }.sorted - def toConsole = string } |