org.clapper

argot

package argot

Visibility
  1. Public
  2. All

Type Members

  1. class ArgotConversionException extends ArgotException

    Thrown to indicate that Argot could not convert a command line parameter to the desired type.

  2. class ArgotException extends Exception

    Base Argot exception class.

  3. class ArgotParser extends AnyRef

    ArgotParser is a command-line parser, with support for single-value and multi-value options, single-value and multi-value parameters, typed value, custom conversions (with suitable defaults), and extensibility.

    ArgotParser is a command-line parser, with support for single-value and multi-value options, single-value and multi-value parameters, typed value, custom conversions (with suitable defaults), and extensibility.

    An ArgotParser embodies a representation of the command line: its expected options and their value types, the expected positional parameters and their value types, the name of the program, and other values.

    For complete details, see the Argot web site (linked below).

    See also

    the Argot web site

  4. class ArgotSpecificationError extends ArgotException

    Thrown to indicate that Argot encountered a problem in the caller's argument specification.

    Thrown to indicate that Argot encountered a problem in the caller's argument specification. This exception can be interpreted as a bug in the caller's program.

  5. class ArgotUsageException extends ArgotException

    Thrown to indicate usage errors.

    Thrown to indicate usage errors. The calling application can catch this exception and print the message, which will be a fully fleshed-out usage string. For instance:

    import org.clapper.argot._
    
    ...
    
    val p = new Argot("MyProgram")
    ...
    try {
      p.parse(args)
    }
    catch {
      case e: ArgotUsageException =>
        println(e.message)
        System.exit(1)
    }
  6. trait CommandLineArgument[T] extends AnyRef

    Base trait for all option and parameter classes, CommandLineArgument contains comment methods and values.

    Base trait for all option and parameter classes, CommandLineArgument contains comment methods and values.

    T

    the type associated with the argument

  7. trait CommandLineOption[T] extends CommandLineArgument[T]

    CommandLineOption is the base trait for all option classes.

    CommandLineOption is the base trait for all option classes.

    T

    the value type

    See also

    MultiValueOption

    SingleValueOption

  8. class FlagOption[T] extends CommandLineOption[T]

    Class for a flag.

    Class for a flag. A flag option consists of a set of names that enable the flag (e.g. set it to true) if present on the command line, and a set of names that disable the flag (e.g., set it to false) if present on the command line. The type of flag option can be anything, but is generally boolean.

  9. trait HasValue[T] extends CommandLineArgument[T]

    The HasValue trait is mixed into option and parameter classes that support one or mor associated values of type T.

    The HasValue trait is mixed into option and parameter classes that support one or mor associated values of type T.

    T

    the value type

    See also

    MultiValueArg

    SingleValueArg

  10. trait MultiValueArg[T] extends HasValue[T]

    MultiValueArg is a refinement of the HasValue trait, specifically for arguments (options or parameters) that take multiple values of type T.

    MultiValueArg is a refinement of the HasValue trait, specifically for arguments (options or parameters) that take multiple values of type T. Each instance of the parameter on the command line adds to the sequence of values in associated MultiValueArg object.

    This trait exists primarily as a place for shared logic and values for the option- and parameter-specific subclasses.

    T

    the value type

    See also

    MultiValueParameter

    MultiValueOption

  11. class MultiValueOption[T] extends CommandLineOption[T] with MultiValueArg[T]

    Class for an option that takes a multiple values.

    Class for an option that takes a multiple values. Each instance of the option on the command line adds to the sequence of values associated with the option.

  12. class MultiValueParameter[T] extends Parameter[T] with MultiValueArg[T]

    Class for a non-option parameter that takes a multiple values.

    Class for a non-option parameter that takes a multiple values. Each instance of the parameter on the command line adds to the sequence of values associated with the parameter.

  13. trait SingleValueArg[T] extends HasValue[T]

    SingleValueArg is a refinement of the HasValue trait, specifically for arguments (options or parameters) that take only a single value.

    SingleValueArg is a refinement of the HasValue trait, specifically for arguments (options or parameters) that take only a single value. This trait exists primarily as a place for shared logic and values for the option- and parameter-specific subclasses.

    T

    the value type

    See also

    SingleValueParameter

    SingleValueOption

  14. class SingleValueOption[T] extends CommandLineOption[T] with SingleValueArg[T]

    Class for an option that takes a single value.

  15. class SingleValueParameter[T] extends Parameter[T] with SingleValueArg[T]

    Class for a non-option parameter that takes a single value.

Value Members

  1. object ArgotConverters

    Conversion functions that can be used to satisfy the implicit conversions specified to the various specification functions in the ArgotParser class.

    Conversion functions that can be used to satisfy the implicit conversions specified to the various specification functions in the ArgotParser class. If you import this namespace, you'll get a bunch of implicit conversion functions that the Scala compiler will automatically use, for the various definition functions in ArgotParser.

    The conversion functions all take the CommandLineArgument for which the value applies. This serves two purposes. First, it provides more information for error messages. Second, it makes the conversion functions less ambiguous.

  2. object ArgotTest

Ungrouped