Package

xerial.lens

cui

Permalink

package cui

Provides command line parser.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. cui
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. trait CLArgItem extends CLOptionItem

    Permalink
  2. case class CLArgument(path: Path, arg: argument, argIndex: Int, param: Parameter) extends CLOptionItemBase with CLArgItem with Product with Serializable

    Permalink

    CommandTrait line argument type and the associated class parameter

  3. case class CLOption(path: Path, annot: option, param: Parameter) extends CLOptionItemBase with Product with Serializable

    Permalink

    CommandTrait line option and the associated class parameter

  4. sealed trait CLOptionItem extends AnyRef

    Permalink

    command-line option

  5. abstract class CLOptionItemBase extends CLOptionItem

    Permalink
  6. class ClassOptionSchema extends OptionSchema

    Permalink

    OptionSchema created from a class definition

  7. trait CommandModule extends AnyRef

    Permalink

    // 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("sample", classOf[MyCommandSet], description="my command set"))
    }
    
    Launcher[MyModule].execute("sample hello") // prints hello
  8. case class CommandNameArgument(path: Path) extends CLArgItem with Product with Serializable

    Permalink
  9. trait DefaultCommand extends AnyRef

    Permalink

    Implement this trait to supply a default command invoked when no command name is specified.

  10. class Launcher extends Logger

    Permalink

    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
  11. class Main extends AnyRef

    Permalink
  12. class MethodOptionSchema extends OptionSchema

    Permalink

    OptionSchema created from a method definition

  13. case class ModuleDef[A](name: String, moduleClass: Class[A], description: String = "") extends Product with Serializable

    Permalink
  14. class OptionParser extends Logger

    Permalink

    CommandTrait-line argument parser

  15. case class OptionParserResult(parseTree: ValueHolder[String], unusedArgument: Array[String], showHelp: Boolean) extends Logger with Product with Serializable

    Permalink
  16. trait OptionSchema extends Logger

    Permalink

    Schema of the command line options

  17. class argument extends Annotation with Annotation with ClassfileAnnotation

    Permalink
  18. class command extends Annotation with Annotation with ClassfileAnnotation

    Permalink
  19. class option extends Annotation with Annotation with ClassfileAnnotation

    Permalink

Value Members

  1. object ClassOptionSchema extends Serializable

    Permalink
  2. object CommandModule

    Permalink
  3. object Launcher extends Logger

    Permalink

    Command launcher

  4. object Main

    Permalink

  5. object OptionParser extends Logger

    Permalink

    Creates option parsers

Inherited from AnyRef

Inherited from Any

Ungrouped