org.rogach.scallop

Scallop

case class Scallop(args: Seq[String] = immutable.this.Nil, opts: List[CliOption] = immutable.this.Nil, mainOptions: List[CliOption] = immutable.this.Nil, optionGroups: List[(String, Seq[CliOption])] = immutable.this.Nil, vers: Option[String] = scala.None, bann: Option[String] = scala.None, foot: Option[String] = scala.None, descr: String = "", helpWidth: Option[Int] = scala.None, shortSubcommandsHelp: Boolean = false, appendDefaultToDescription: Boolean = false, noshort: Boolean = false, helpFormatter: ScallopHelpFormatter = new ScallopHelpFormatter(), subbuilders: List[(String, Scallop)] = immutable.this.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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

Type Members

  1. case class CliOptionInvocation(opt: CliOption, invocation: String, args: List[String], error: Option[ScallopException] = scala.None) extends Product with Serializable

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

  3. type Parsed = List[CliOptionInvocation]

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def addSubBuilder(nameAndAliases: Seq[String], builder: Scallop): Scallop

    Adds a subbuilder (subcommand) to this builder.

  7. val appendDefaultToDescription: Boolean

  8. def appendOption(option: CliOption): Scallop

  9. def apply(name: Char): Any

  10. def apply(name: String): Any

    Get the value of option.

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

    name

    Name for option.

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

    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

  12. val args: Seq[String]

  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. val bann: Option[String]

  15. def banner(b: String): Scallop

    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!

  16. def clone(): AnyRef

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

  18. final def eq(arg0: AnyRef): Boolean

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

    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

  20. def finalize(): Unit

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

    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.

  22. val foot: Option[String]

  23. def footer(f: String): Scallop

    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!

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

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

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

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

    name

    Name for option.

  26. def getAllSuppliedOptionNames: List[String]

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

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

    Definition Classes
    AnyRef → Any
  28. def getFullHelpString(): String

    Get full help text (with version, banner, option usage and footer)

  29. lazy val getHelpOption: CliOption

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

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

    Find an option, that responds to this short name.

  32. def getSubbuilder: Option[Scallop]

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

  33. def getSubcommandArgs: List[String]

    Returns the subcommand arguments.

  34. def getSubcommandName: Option[String]

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

  35. def getSubcommandNames: List[String]

    Returns the list of subcommand names, recursively.

  36. lazy val getVersionOption: Option[CliOption]

  37. def help: String

    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.

  38. val helpFormatter: ScallopHelpFormatter

  39. val helpWidth: Option[Int]

  40. final def isInstanceOf[T0]: Boolean

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

    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

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

    Definition Classes
    ScallopArgListLoader
  43. val mainOptions: List[CliOption]

  44. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  45. val noshort: Boolean

  46. final def notify(): Unit

    Definition Classes
    AnyRef
  47. final def notifyAll(): Unit

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

  49. val opts: List[CliOption]

  50. var parent: Option[Scallop]

  51. def printHelp(): Unit

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

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

  53. def setHelpWidth(w: Int): Scallop

    Explicitly sets the needed width for the help printout.

  54. val shortSubcommandsHelp: Boolean

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

  56. def summary: String

    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.

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

    Definition Classes
    AnyRef
  58. def verify: Scallop

    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.

  59. val vers: Option[String]

  60. def version(v: String): Scallop

    Add version string to this builder.

    Add version string to this builder.

    v

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

  61. final def wait(): Unit

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

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

    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