wvlet.airframe.launcher
Type members
Classlikes
OptionSchema created from a class definition
OptionSchema created from a class definition
- Companion:
- object
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
Interface for printing help messages
Interface for printing help messages
- Companion:
- object
Command execution results
Command execution results
OptionSchema created from a method definition
OptionSchema created from a method definition
- Companion:
- object
Schema of the command line options
Schema of the command line options
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.
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 = EmptyNode.set("a", apple) => Node(a -> Leaf(apple))
val n2 = n1.set("B.b", "book") => Node(a -> Leaf(apple), B -> EmptyNode.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)))
- Companion:
- object