package opts
- Alphabetic
- Public
- All
Type Members
- trait CLArgItem extends CLOptionItem
-
case class
CLArgument(path: Path, arg: argument, argIndex: Int, param: Parameter) extends CLOptionItemBase with CLArgItem with Product with Serializable
CommandTrait line argument type and the associated class parameter
-
case class
CLOption(path: Path, annot: option, param: Parameter) extends CLOptionItemBase with Product with Serializable
CommandTrait line option and the associated class parameter
-
sealed
trait
CLOptionItem extends AnyRef
command-line option
- abstract class CLOptionItemBase extends CLOptionItem
-
class
ClassOptionSchema extends OptionSchema
OptionSchema created from a class definition
-
trait
CommandModule extends AnyRef
// Define your command set class MyCommandSet { \@command def hello = println("hello") \@command def world = println("world") } // Integrate the above command set as a module with a given name. // Command can be invoked as "sample hello" and "sample world". class MyModule extends CommandModule { def modules = Seq(ModuleDef[MyCommandSet]("sample", description="my command set")) } Launcher[MyModule].execute("sample hello") // prints hello
- case class CommandNameArgument(path: Path) extends CLArgItem with Product with Serializable
-
trait
DefaultCommand extends AnyRef
Implement this trait to supply a default command invoked when no command name is specified.
-
class
Launcher extends LogSupport
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
-
class
MethodOptionSchema extends OptionSchema
OptionSchema created from a method definition
- case class ModuleDef[A](name: String, description: String = "")(implicit evidence$1: scala.reflect.api.JavaUniverse.TypeTag[A]) extends Product with Serializable
-
class
OptionParser extends LogSupport
CommandTrait-line argument parser
- case class OptionParserResult(parseTree: ValueHolder[String], unusedArgument: Array[String], showHelp: Boolean) extends LogSupport with Product with Serializable
-
trait
OptionSchema extends LogSupport
Schema of the command line options
- class StringTemplate extends AnyRef
-
trait
ValueHolder[+A] extends AnyRef
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)))
- class argument extends Annotation with Annotation with ClassfileAnnotation
- class command extends Annotation with Annotation with ClassfileAnnotation
- class option extends Annotation with Annotation with ClassfileAnnotation
Value Members
- object ClassOptionSchema extends LogSupport
-
object
CommandLineTokenizer extends RegexParsers with LogSupport
Tokenize single string representations of command line arguments into Array[String]
- object CommandModule
-
object
Launcher extends LogSupport
Command launcher
-
object
OptionParser extends LogSupport
Creates option parsers
- object StringTemplate
- object ValueHolder extends LogSupport