t

argparse.core

ParsersApi

trait ParsersApi extends AnyRef

Self Type
ParsersApi with TypesApi
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ParsersApi
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class ArgumentParser extends AnyRef

    A simple command line argument parser.

    A simple command line argument parser.

    Usage:

    1. Define parameters with param, requiredParam and repeatedParam. Each of these methods gives back a handle to a future argument value.

    2. Call parseOrExit() with actual arguments.

    3. If parsing succeeds, the arguments will be available in the handles defined in step 1.

    If parsing fails, error descriptions are printed and the program exits with 2.

    Example:

    scala val parser = argparse.default.ArgumentParser()

    val p1 = parser.param[String]("--this-is-a-named-param", default = "default value") val p2 = parser.param[Int]("positional-param", default = 2)

    parser.parseOrExit(Seq("--this-is-a-named-param=other", 5)) println(p1.value) println(p2.value)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def defaultBashCompletionFlags: Seq[String]

    The name of the flag to use for generating standalone bash-completion.

    The name of the flag to use for generating standalone bash-completion.

    Set this to empty to disable bash-completion entirely.

    Note that individual argument parsers may override this.

  7. def defaultHelpFlags: Seq[String]

    The name of the flag to use for printing help messages.

    The name of the flag to use for printing help messages.

    Set this to empty to disable help entirely.

    Note that individual argument parsers may override this.

  8. def defaultHelpMessage(parser: ArgumentParser): String

    Generate a help message from parameters.

    Generate a help message from parameters.

    This message will be used by ArgumentParsers. Overriding this allows you to customize the help message of all ArgumentParsers.

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def exit(code: Int): Nothing

    Called by parseOrExit in case of error.

    Called by parseOrExit in case of error.

    Overriding this can be useful in situations where you do not want to exit, for example in tests.

    Attributes
    protected
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. object ArgumentParser

Inherited from AnyRef

Inherited from Any

Ungrouped