Class

org.rogach.scallop

Scallop

Related Doc: package scallop

Permalink

case class Scallop(args: Seq[String] = Nil, opts: List[CliOption] = Nil, mainOptions: List[CliOption] = Nil, optionGroups: List[(String, Seq[CliOption])] = Nil, vers: Option[String] = None, bann: Option[String] = None, foot: Option[String] = None, descr: String = "", helpWidth: Option[Int] = None, shortSubcommandsHelp: Boolean = false, appendDefaultToDescription: Boolean = false, noshort: Boolean = false, helpFormatter: ScallopHelpFormatter = new ScallopHelpFormatter, subbuilders: List[(String, Scallop)] = Nil) extends ScallopArgListLoader with Product with Serializable

Internal configuration builder.

Source
Scallop.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, ScallopArgListLoader, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Scallop
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. ScallopArgListLoader
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Scallop(args: Seq[String] = Nil, opts: List[CliOption] = Nil, mainOptions: List[CliOption] = Nil, optionGroups: List[(String, Seq[CliOption])] = Nil, vers: Option[String] = None, bann: Option[String] = None, foot: Option[String] = None, descr: String = "", helpWidth: Option[Int] = None, shortSubcommandsHelp: Boolean = false, appendDefaultToDescription: Boolean = false, noshort: Boolean = false, helpFormatter: ScallopHelpFormatter = new ScallopHelpFormatter, subbuilders: List[(String, Scallop)] = Nil)

    Permalink

Type Members

  1. case class ParseResult(opts: Parsed = Nil, subcommand: Option[String] = None, subcommandArgs: List[String] = Nil) extends Product with Serializable

    Permalink
  2. type Parsed = List[(CliOption, (String, List[String]))]

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addSubBuilder(nameAndAliases: Seq[String], builder: Scallop): Scallop

    Permalink

    Adds a subbuilder (subcommand) to this builder.

  5. val appendDefaultToDescription: Boolean

    Permalink
  6. def appendOption(option: CliOption): Scallop

    Permalink
  7. def apply(name: Char): Any

    Permalink
  8. def apply(name: String): Any

    Permalink

    Get the value of option.

    Get the value of option. If option is not found, this will throw an exception.

    name

    Name for option.

  9. def args(a: Seq[String]): Scallop

    Permalink

    Add some more arguments to this builder.

    Add some more arguments to this builder. They are appended to the end of the original list.

    a

    arg list to add

  10. val args: Seq[String]

    Permalink
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. val bann: Option[String]

    Permalink
  13. def banner(b: String): Scallop

    Permalink

    Add banner string to this builder.

    Add banner string to this builder. Banner should describe your program and provide a short summary on it's usage.

    b

    Banner string, can contain multiple lines. Note this is not formatted to 80 characters!

  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. val descr: String

    Permalink
  16. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def filteredSummary(blurred: Set[String]): String

    Permalink

    Get summary of current parser state, hididng values for some of the options.

    Get summary of current parser state, hididng values for some of the options. Useful if you log the summary and want to avoid storing sensitive information in the logs (like passwords)

    blurred

    names of the options that should be hidden.

    returns

    a list of all options in the builder

  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def findSubbuilder(name: String): Option[Scallop]

    Permalink

    Traverses the tree of subbuilders, using the provided name.

    Traverses the tree of subbuilders, using the provided name.

    name

    Names of subcommand names, that lead to the needed builder, separated by \\0.

  20. val foot: Option[String]

    Permalink
  21. def footer(f: String): Scallop

    Permalink

    Add footer string to this builder.

    Add footer string to this builder. Footer will be printed in help after option definitions.

    f

    Footer string, can contain multiple lines. Note this is not formatted to 80 characters!

  22. def get(name: Char): Option[Any]

    Permalink
  23. def get(name: String): Option[Any]

    Permalink

    Get the value of option (or trailing arg) as Option.

    Get the value of option (or trailing arg) as Option.

    name

    Name for option.

  24. def getAllSuppliedOptionNames: List[String]

    Permalink

    Retrieves a list of all supplied options (including options from subbuilders).

  25. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  26. lazy val getHelpOption: CliOption

    Permalink
  27. def getOptionShortNames(opt: CliOption): List[Char]

    Permalink
  28. def getOptionWithShortName(c: Char): Option[CliOption]

    Permalink

    Find an option, that responds to this short name.

  29. def getSubbuilder: Option[Scallop]

    Permalink

    Retrieves the subbuilder object, that matches the name of the subcommand found in input arguments.

  30. def getSubcommandArgs: List[String]

    Permalink

    Returns the subcommand arguments.

  31. def getSubcommandName: Option[String]

    Permalink

    Retrieves name of the subcommand that was found in input arguments.

  32. def getSubcommandNames: List[String]

    Permalink

    Returns the list of subcommand names, recursively.

  33. lazy val getVersionOption: Option[CliOption]

    Permalink
  34. def help: String

    Permalink

    Get help on options from this builder.

    Get help on options from this builder. The resulting help is carefully formatted to required number of columns (default = 80, change with .setHelpWidth method), and contains info on properties, options and trailing arguments.

  35. val helpFormatter: ScallopHelpFormatter

    Permalink
  36. val helpWidth: Option[Int]

    Permalink
  37. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  38. def isSupplied(name: String): Boolean

    Permalink

    Tests if this option or trailing arg was explicitly provided by argument list (not from default).

    Tests if this option or trailing arg was explicitly provided by argument list (not from default).

    name

    Identifier of option or trailing arg definition

  39. def loadArgList(args: Seq[String]): Seq[String]

    Permalink
    Definition Classes
    ScallopArgListLoader
  40. val mainOptions: List[CliOption]

    Permalink
  41. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  42. val noshort: Boolean

    Permalink
  43. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. val optionGroups: List[(String, Seq[CliOption])]

    Permalink
  46. val opts: List[CliOption]

    Permalink
  47. var parent: Option[Scallop]

    Permalink
  48. def printHelp(): Unit

    Permalink

    Print help message (with version, banner, option usage and footer) to stdout.

  49. def prop(name: Char, key: String): Option[Any]

    Permalink
  50. def setHelpWidth(w: Int): Scallop

    Permalink

    Explicitly sets the needed width for the help printout.

  51. val shortSubcommandsHelp: Boolean

    Permalink
  52. val subbuilders: List[(String, Scallop)]

    Permalink
  53. def summary: String

    Permalink

    Get summary of current parser state.

    Get summary of current parser state.

    Returns a list of all options in the builder, and corresponding values for them.

  54. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  55. def verify: Scallop

    Permalink

    Verify the builder.

    Verify the builder. Parses arguments, makes sure no definitions clash, no garbage or unknown options are present, and all present arguments are in proper format. It is recommended to call this method before using the results.

    If there is "--help" or "--version" option present, it prints help or version statement and exits.

  56. val vers: Option[String]

    Permalink
  57. def version(v: String): Scallop

    Permalink

    Add version string to this builder.

    Add version string to this builder.

    v

    Version string, to be printed before all other things in help.

  58. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from ScallopArgListLoader

Inherited from AnyRef

Inherited from Any

Ungrouped