Thrown to indicate that Argot could not convert a command line parameter to the desired type.
Base Argot exception class.
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.
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.
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) }
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.
the type associated with the argument
CommandLineOption
is the base trait for all option classes.
CommandLineOption
is the base trait for all option classes.
the value type
MultiValueOption
SingleValueOption
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.
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
.
the value type
MultiValueArg
SingleValueArg
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.
the value type
MultiValueParameter
MultiValueOption
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.
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.
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.
the value type
SingleValueParameter
SingleValueOption
Class for an option that takes a single value.
Class for a non-option parameter that takes a single value.
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.
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).
the Argot web site