CommandTrait line argument type and the associated class parameter
CommandTrait line option and the associated class parameter
command-line option
OptionSchema created from a class definition
Implement this trait to supply a default command invoked when no command name is specified.
Command launcher.
Command launcher.
class MyCommand(@option(prefix="-h,--help", description="display help", isHelp=true) help:Boolean) { @command(description="Say hello") def hello(@option(prefix="-r", description="repeat times") repeat:Int=1, @argument message:String = "hello") { for(i <- 0 until repeat) println(message) } } Launcher.execute[MyCommand]("hello -r 3") // hello x 3
OptionSchema created from a method definition
CommandTrait-line argument parser
Schema of the command line options
Holder of structured data consisting of named values.
Holder of structured data consisting of named values. ValueHolder is immutable, so the set operations in this class return another ValueHolder and never modify the original ValueHolder.
A(a, B(b, c)) { a: apple, B:{b:book, c:car} } val n1 = Empty.set("a", apple) => Node(a -> Leaf(apple)) val n2 = n1.set("B.b", "book") => Node(a -> Leaf(apple), B -> Empty.set("b", "book")) => Node(a -> apple, B->Node(b -> Leaf(book))) val n3 = n2.set("B.c", "car") => Node(a ->apple, B->Node(b -> Leaf(book), c->Leaf(car)))
Tokenize single string representations of command line arguments into Array[String]
Command launcher
Creates option parsers