org.rogach.scallop

Subcommand

class Subcommand extends ScallopConf

Source
ScallopConf.scala
Linear Supertypes
ScallopConf, AfterInit, DelayedInit, ScallopConfValidations, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Subcommand
  2. ScallopConf
  3. AfterInit
  4. DelayedInit
  5. ScallopConfValidations
  6. AnyRef
  7. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Subcommand(commandName: String)

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. final def afterInit(): Unit

    Definition Classes
    ScallopConfAfterInit
  7. val args: Seq[String]

    Definition Classes
    ScallopConf
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def assertVerified: Unit

    Checks that this Conf object is verified.

    Checks that this Conf object is verified. If it is not, throws an exception.

    Definition Classes
    ScallopConf
  10. def banner(b: String): Unit

    Add a banner string to option builder.

    Add a banner string to option builder.

    b

    Banner string.

    Definition Classes
    ScallopConf
  11. var builder: Scallop

    Definition Classes
    ScallopConf
  12. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def codependent(list: org.rogach.scallop.ScallopOption[_]*): Unit

    In the verify stage, checks that either all or none of the provided options have values supplied in arguments.

    In the verify stage, checks that either all or none of the provided options have values supplied in arguments.

    list

    list of codependent options

    Definition Classes
    ScallopConf
  14. val commandName: String

  15. val commandname: String

    Attributes
    protected
    Definition Classes
    ScallopConf
  16. final def delayedInit(x: ⇒ Unit): Unit

    Definition Classes
    AfterInit → DelayedInit
  17. def descr(d: String): Unit

    Short description for this subcommand.

    Short description for this subcommand. Used if parent command has shortSubcommandsHelp enabled.

  18. def editBuilder(fn: (Scallop) ⇒ Scallop): Unit

    Definition Classes
    ScallopConf
  19. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  21. var errorMessageHandler: (String) ⇒ Unit

    This function is called with the error message when ScallopException occurs.

    This function is called with the error message when ScallopException occurs. By default, this function prints message (prefixed by *printedName*) to stdout, coloring the output if possible, then calls sys.exit(1).

    Update this variable with another function if you need to change that behavior.

    Definition Classes
    ScallopConf
  22. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  23. def footer(f: String): Unit

    Add a footer string to this builder.

    Add a footer string to this builder.

    f

    footer string.

    Definition Classes
    ScallopConf
  24. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  25. def getName(name: String): String

    Definition Classes
    ScallopConf
  26. def guessOptionName: Boolean

    If true, scallop would try to guess missing option names from the names of their fields.

    If true, scallop would try to guess missing option names from the names of their fields.

    Definition Classes
    ScallopConf
  27. def guessOptionName_=(v: Boolean): Unit

    If set to true, scallop would try to guess missing option names from the names of their fields.

    If set to true, scallop would try to guess missing option names from the names of their fields.

    Definition Classes
    ScallopConf
  28. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  29. def helpWidth(w: Int): Unit

    Explicitly set width of help printout.

    Explicitly set width of help printout. By default, Scallop tries to determine it from terminal width or defaults to 80 characters.

    Definition Classes
    ScallopConf
  30. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  31. def mainOptions: Seq[String]

    Options, that are to be printed first in the help printout

    Options, that are to be printed first in the help printout

    Definition Classes
    ScallopConf
  32. def mainOptions_=(newMainOptions: ⇒ Seq[org.rogach.scallop.ScallopOption[_]]): Unit

    Set options, that are to be printed first in the help printout

    Set options, that are to be printed first in the help printout

    Definition Classes
    ScallopConf
  33. def mutuallyExclusive(list: org.rogach.scallop.ScallopOption[_]*): Unit

    In the verify stage, checks that only one or zero of the provided options have values supplied in arguments.

    In the verify stage, checks that only one or zero of the provided options have values supplied in arguments.

    list

    list of mutually exclusive options

    Definition Classes
    ScallopConf
  34. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  35. final def notify(): Unit

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

    Definition Classes
    AnyRef
  37. def onError(e: Throwable): Unit

    This function is called in event of any exception in arguments parsing.

    This function is called in event of any exception in arguments parsing. By default, it catches only standard Scallop errors, letting all other pass through.

    Attributes
    protected
    Definition Classes
    ScallopConf
  38. def opt[A](name: String, short: Char, descr: String, default: ⇒ Option[A], validate: (A) ⇒ Boolean, required: Boolean, argName: String, hidden: Boolean, noshort: Boolean)(implicit conv: ValueConverter[A]): ScallopOption[A]

    Add a new option definition to this config and get a holder for the value.

    Add a new option definition to this config and get a holder for the value.

    name

    Name for new option, used as long option name in parsing, and for option identification.

    short

    Overload the char that will be used as short option name. Defaults to first character of the name.

    descr

    Description for this option, for help description.

    default

    Default value to use if option is not found in input arguments (if you provide this, you can omit the type on method).

    required

    Is this option required? Defaults to false.

    argName

    The name for this option argument, as it will appear in help. Defaults to "arg".

    noshort

    If set to true, then this option does not have any short name.

    conv

    The converter for this option. Usually found implicitly.

    returns

    A holder for parsed value

    Definition Classes
    ScallopConf
  39. def printHelp(): Unit

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

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

    Definition Classes
    ScallopConf
  40. var printedName: String

    This name would be included in output when reporting errors.

    This name would be included in output when reporting errors.

    Definition Classes
    ScallopConf
  41. def props[A](name: Char = 'D', descr: String = "", keyName: String = "key", valueName: String = "value", hidden: Boolean = false)(implicit conv: ValueConverter[Map[String, A]]): Map[String, A]

    Add new property option definition to this config object, and get a handle for option retreiving.

    Add new property option definition to this config object, and get a handle for option retreiving.

    name

    Char, that will be used as prefix for property arguments.

    descr

    Description for this property option, for help description.

    keyName

    Name for 'key' part of this option arg name, as it will appear in help option definition. Defaults to "key".

    valueName

    Name for 'value' part of this option arg name, as it will appear in help option definition. Defaults to "value".

    returns

    A holder for retreival of the values.

    Definition Classes
    ScallopConf
  42. def propsLong[A](name: String = "Props", descr: String = "", keyName: String = "key", valueName: String = "value", hidden: Boolean = false)(implicit conv: ValueConverter[Map[String, A]]): Map[String, A]

    Definition Classes
    ScallopConf
  43. val rootConfig: ScallopConf

    Definition Classes
    ScallopConf
  44. def shortSubcommandsHelp(v: Boolean = true): Unit

    Definition Classes
    ScallopConf
  45. def subcommand: Option[ScallopConf]

    Retrieves the choosen subcommand.

    Retrieves the choosen subcommand.

    Definition Classes
    ScallopConf
  46. def subcommands: List[ScallopConf]

    Retrieves the list of the chosen nested subcommands.

    Retrieves the list of the chosen nested subcommands.

    Definition Classes
    ScallopConf
  47. var subconfigs: List[ScallopConf]

    List of sub-configs of this config.

    List of sub-configs of this config.

    Definition Classes
    ScallopConf
  48. 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.

    Definition Classes
    ScallopConf
  49. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  50. def tally(name: String = null, short: Char = 0.toChar, descr: String = "", hidden: Boolean = false, noshort: Boolean = false): ScallopOption[Int]

    Definition Classes
    ScallopConf
  51. def toString(): String

    Definition Classes
    AnyRef → Any
  52. def toggle(name: String = null, default: ⇒ Option[Boolean] = None, short: Char = '\0', noshort: Boolean = false, prefix: String = "no", descrYes: String = "", descrNo: String = "", hidden: Boolean = false): ScallopOption[Boolean]

    Add new toggle option definition to this config, and get a holder for it's value.

    Add new toggle option definition to this config, and get a holder for it's value.

    Toggle options are just glorified flag options. For example, if you will ask for a toggle option with name "verbose", it will be invocable in three ways - "--verbose", "--noverbose", "-v".

    name

    Name of this option

    default

    default value for this option

    short

    Overload the char that will be used as short option name. Defaults to first character of the name.

    noshort

    If set to true, then this option will not have any short name.

    descrYes

    Description for positive variant of this option.

    descrNo

    Description for negative variant of this option.

    hidden

    If set to true, then this option will not be present in auto-generated help.

    Definition Classes
    ScallopConf
  53. def trailArg[A](name: String, descr: String, validate: (A) ⇒ Boolean, required: Boolean, default: ⇒ Option[A], hidden: Boolean)(implicit conv: ValueConverter[A]): ScallopOption[A]

    Add new trailing argument definition to this config, and get a holder for it's value.

    Add new trailing argument definition to this config, and get a holder for it's value.

    name

    Name for new definition, used for identification.

    required

    Is this trailing argument required? Defaults to true.

    default

    If this argument is not required and not found in the argument list, use this value.

    Definition Classes
    ScallopConf
  54. def validate[A1, A2, A3, A4, A5, A6, A7](o1: ScallopOption[A1], o2: ScallopOption[A2], o3: ScallopOption[A3], o4: ScallopOption[A4], o5: ScallopOption[A5], o6: ScallopOption[A6], o7: ScallopOption[A7])(fn: (A1, A2, A3, A4, A5, A6, A7) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps. Automatically defines co-dependent relationship on these options.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  55. def validate[A1, A2, A3, A4, A5, A6](o1: ScallopOption[A1], o2: ScallopOption[A2], o3: ScallopOption[A3], o4: ScallopOption[A4], o5: ScallopOption[A5], o6: ScallopOption[A6])(fn: (A1, A2, A3, A4, A5, A6) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps. Automatically defines co-dependent relationship on these options.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  56. def validate[A1, A2, A3, A4, A5](o1: ScallopOption[A1], o2: ScallopOption[A2], o3: ScallopOption[A3], o4: ScallopOption[A4], o5: ScallopOption[A5])(fn: (A1, A2, A3, A4, A5) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps. Automatically defines co-dependent relationship on these options.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  57. def validate[A1, A2, A3, A4](o1: ScallopOption[A1], o2: ScallopOption[A2], o3: ScallopOption[A3], o4: ScallopOption[A4])(fn: (A1, A2, A3, A4) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps. Automatically defines co-dependent relationship on these options.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  58. def validate[A1, A2, A3](o1: ScallopOption[A1], o2: ScallopOption[A2], o3: ScallopOption[A3])(fn: (A1, A2, A3) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps. Automatically defines co-dependent relationship on these options.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  59. def validate[A1, A2](o1: ScallopOption[A1], o2: ScallopOption[A2])(fn: (A1, A2) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps. Automatically defines co-dependent relationship on these options.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  60. def validate[A1](o1: ScallopOption[A1])(fn: (A1) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps. Automatically defines co-dependent relationship on these options.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  61. def validateOpt[A1, A2, A3, A4, A5, A6, A7](o1: ScallopOption[A1], o2: ScallopOption[A2], o3: ScallopOption[A3], o4: ScallopOption[A4], o5: ScallopOption[A5], o6: ScallopOption[A6], o7: ScallopOption[A7])(fn: (Option[A1], Option[A2], Option[A3], Option[A4], Option[A5], Option[A6], Option[A7]) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  62. def validateOpt[A1, A2, A3, A4, A5, A6](o1: ScallopOption[A1], o2: ScallopOption[A2], o3: ScallopOption[A3], o4: ScallopOption[A4], o5: ScallopOption[A5], o6: ScallopOption[A6])(fn: (Option[A1], Option[A2], Option[A3], Option[A4], Option[A5], Option[A6]) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  63. def validateOpt[A1, A2, A3, A4, A5](o1: ScallopOption[A1], o2: ScallopOption[A2], o3: ScallopOption[A3], o4: ScallopOption[A4], o5: ScallopOption[A5])(fn: (Option[A1], Option[A2], Option[A3], Option[A4], Option[A5]) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  64. def validateOpt[A1, A2, A3, A4](o1: ScallopOption[A1], o2: ScallopOption[A2], o3: ScallopOption[A3], o4: ScallopOption[A4])(fn: (Option[A1], Option[A2], Option[A3], Option[A4]) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  65. def validateOpt[A1, A2, A3](o1: ScallopOption[A1], o2: ScallopOption[A2], o3: ScallopOption[A3])(fn: (Option[A1], Option[A2], Option[A3]) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  66. def validateOpt[A1, A2](o1: ScallopOption[A1], o2: ScallopOption[A2])(fn: (Option[A1], Option[A2]) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  67. def validateOpt[A1](o1: ScallopOption[A1])(fn: (Option[A1]) ⇒ Either[String, Unit]): Unit

    Adds a validation function to this configuration.

    Adds a validation function to this configuration. This function will be run after all other verification steps.

    fn

    Validation function. In case of error, it should return Left with the error message.

    Definition Classes
    ScallopConfValidations
  68. var validations: List[() ⇒ Either[String, Unit]]

    Attributes
    protected
    Definition Classes
    ScallopConfValidations
  69. var verified: Boolean

    Definition Classes
    ScallopConf
  70. def version(v: String): Unit

    Add a version string to option builder.

    Add a version string to option builder.

    v

    Version string.

    Definition Classes
    ScallopConf
  71. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from ScallopConf

Inherited from AfterInit

Inherited from DelayedInit

Inherited from ScallopConfValidations

Inherited from AnyRef

Inherited from Any