com.phasmidsoftware.args

Members list

Type members

Classlikes

case class AmbiguousNameException(name: String) extends ArgsException

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
case class Arg[X](name: Option[String], value: Option[X]) extends Ordered[Arg[X]]

Case class to represent an "option" in a command line. Such an option has an (optional) name which is a String; and an (optional) value, which is of type X.

Case class to represent an "option" in a command line. Such an option has an (optional) name which is a String; and an (optional) value, which is of type X.

Type parameters

X

the underlying type of the value.

Value parameters

name

the optional name.

value

the optional value.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Ordered[Arg[X]]
trait Comparable[Arg[X]]
class Object
trait Matchable
class Any
Show all
object Arg

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Arg.type
case class Args[X](xas: Seq[Arg[X]]) extends Iterable[Arg[X]]

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Iterable[Arg[X]]
trait IterableFactoryDefaults[Arg[X], Iterable]
trait IterableOps[Arg[X], Iterable, Iterable[Arg[X]]]
trait IterableOnceOps[Arg[X], Iterable, Iterable[Arg[X]]]
trait IterableOnce[Arg[X]]
class Object
trait Matchable
class Any
Show all
object Args

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Args.type
abstract class ArgsException(s: String) extends Exception

Attributes

Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Derivable[T]

Type-class trait to allow conversion from type X to type T

Type-class trait to allow conversion from type X to type T

Type parameters

T

the result type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Derivable

Provides default given instances of the Derivable type class for specific types. Each instance defines a mechanism to derive a value of type T from an input value of type X.

Provides default given instances of the Derivable type class for specific types. Each instance defines a mechanism to derive a value of type T from an input value of type X.

Contains given instances for the following derivations:

  • Boolean from String
  • Int from String
  • Double from String
  • java.io.File from String
  • java.net.URL from String

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Derivable.type
trait Element extends Ordered[Element]

This represents an element in the synopsis for a command line

This represents an element in the synopsis for a command line

Attributes

Supertypes
trait Ordered[Element]
trait Comparable[Element]
class Object
trait Matchable
class Any
Known subtypes
class Flag
class Operand
class Value
case object EmptyArgsException extends ArgsException

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
case class Flag(value: String) extends Element

This represents an "Option" in the parlance of POSIX command line interpretation (but formerly these options were known as flags)

This represents an "Option" in the parlance of POSIX command line interpretation (but formerly these options were known as flags)

Value parameters

value

the (single-character) String representing the option (flag)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Element
trait Ordered[Element]
trait Comparable[Element]
class Object
trait Matchable
class Any
Show all
case class FlagWithValue(value: String, element: Element) extends Element

This represents an "Option" and its "Value"

This represents an "Option" and its "Value"

Value parameters

element

the Element which corresponds to the "value" of this synopsis flag (and which may of course be OptionalElement).

value

the flag or "option" String

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Element
trait Ordered[Element]
trait Comparable[Element]
class Object
trait Matchable
class Any
Show all
case class InvalidOptionException[X](arg: Arg[X]) extends ArgsException

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class MapException(str: String) extends ArgsException

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class NoDerivationAvailable(xc: Class[_], yc: Class[_]) extends RuntimeException

Attributes

Supertypes
trait Product
trait Equals
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class NoMatchException(str: String) extends ArgsException

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class NoOptionInSynopsisException(str: String) extends ArgsException

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class NoValueException(name: Option[String]) extends ArgsException

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class NotFoundException(command: String) extends ArgsException

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class Operand(value: String) extends Element

This represents an operand in the parlance of POSIX.

This represents an operand in the parlance of POSIX.

Value parameters

value

the String

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Element
trait Ordered[Element]
trait Comparable[Element]
class Object
trait Matchable
class Any
Show all
case class OptionalElement(element: Element) extends Element

This represents an optional synopsis element, either an optional flag, or an optional value.

This represents an optional synopsis element, either an optional flag, or an optional value.

Value parameters

element

a synopsis element that is optional

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Element
trait Ordered[Element]
trait Comparable[Element]
class Object
trait Matchable
class Any
Show all
case class ParseException(cause: String) extends ArgsException

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
class Parser extends RegexParsers

Parser of POSIX-style command lines.

Parser of POSIX-style command lines.

TODO there is a problem with testing equality of Elements (it's too liberal)

Attributes

Supertypes
trait RegexParsers
trait Parsers
class Object
trait Matchable
class Any
trait PosixArg

a Posix Arg

a Posix Arg

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class PosixOperand(value: String) extends PosixArg

The value of an operand, i.e. a String which follows all of the options and their values.

The value of an operand, i.e. a String which follows all of the options and their values.

Value parameters

value

a String

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait PosixArg
class Object
trait Matchable
class Any
Show all
case class PosixOptionString(value: String) extends PosixArg

One or more options. Each option is a single-letter, although the terminating characters can be a value.

One or more options. Each option is a single-letter, although the terminating characters can be a value.

Value parameters

value

the string of options, without the "-" prefix.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait PosixArg
class Object
trait Matchable
class Any
Show all
class SimpleArgParser extends RegexParsers

Parser of non-POSIX command lines

Parser of non-POSIX command lines

Attributes

Supertypes
trait RegexParsers
trait Parsers
class Object
trait Matchable
class Any
case class Synopsis(es: Seq[Element])

Represents a synopsis for a command line, containing a sequence of elements.

Represents a synopsis for a command line, containing a sequence of elements.

Value parameters

es

the sequence of elements in the synopsis

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class SynopsisParser extends RegexParsers

SynopsisParser is responsible for parsing a command-line synopsis and extracting its structural elements. It extends the RegexParsers trait to leverage regular-expression-based parsing mechanisms.

SynopsisParser is responsible for parsing a command-line synopsis and extracting its structural elements. It extends the RegexParsers trait to leverage regular-expression-based parsing mechanisms.

Attributes

Supertypes
trait RegexParsers
trait Parsers
class Object
trait Matchable
class Any
case class ValidationException[X](a: Args[X], s: Synopsis) extends ArgsException

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class Value(value: String) extends Element

This represents an Option Value in the parlance of POSIX.

This represents an Option Value in the parlance of POSIX.

Value parameters

value

the String

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Element
trait Ordered[Element]
trait Comparable[Element]
class Object
trait Matchable
class Any
Show all