Package

wvlet

opts

Permalink

package opts

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 CName extends Comparable[CName]

    Permalink

    Cannonical name.

    Cannonical name. This name is used as a common name of wording variants (e.g., difference of capital letter usage, hyphenation, etc.)

  7. class ClassOptionSchema extends OptionSchema

    Permalink

    OptionSchema created from a class definition

  8. 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
  9. case class CommandNameArgument(path: Path) extends CLArgItem with Product with Serializable

    Permalink
  10. trait DefaultCommand extends AnyRef

    Permalink

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

  11. class Launcher extends LogSupport

    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
  12. class MethodCallBuilder extends StandardBuilder[MethodParameter] with LogSupport

    Permalink

    Builds method call arguments

  13. class MethodOptionSchema extends OptionSchema

    Permalink

    OptionSchema created from a method definition

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

    Permalink
  15. class OptionParser extends LogSupport

    Permalink

    CommandTrait-line argument parser

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

    Permalink
  17. trait OptionSchema extends LogSupport

    Permalink

    Schema of the command line options

  18. class StringTemplate extends AnyRef

    Permalink

  19. class argument extends Annotation with Annotation with ClassfileAnnotation

    Permalink
  20. class command extends Annotation with Annotation with ClassfileAnnotation

    Permalink
  21. class option extends Annotation with Annotation with ClassfileAnnotation

    Permalink

Value Members

  1. object CName

    Permalink

    Utility for managing names written in different spellings.

    Utility for managing names written in different spellings. For example, variable name localAddress can be written as "local address", "local_address", etc.

    CanonicalName is the representative name of these variants.

    CName("localAddress") == CName("local address") == CName("local_address")
    

  2. object ClassOptionSchema extends Serializable

    Permalink
  3. object CommandLineTokenizer extends RegexParsers with LogSupport

    Permalink

    Tokenize single string representations of command line arguments into Array[String]

  4. object CommandModule

    Permalink
  5. object Launcher extends LogSupport

    Permalink

    Command launcher

  6. object OptionParser extends LogSupport

    Permalink

    Creates option parsers

  7. object StringTemplate

    Permalink

Ungrouped