final class ConsParser[H, T <: HList, DT <: HList] extends Parser[::[H, T]] with Product with Serializable
- Alphabetic
- By Inheritance
- ConsParser
- Serializable
- Product
- Equals
- Parser
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ::[A](argument: Argument[A]): ConsParser[A, ::[H, T], D]
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val args: Seq[Arg]
Arguments this parser accepts.
Arguments this parser accepts.
Used to generate help / usage messages.
- Definition Classes
- ConsParser → Parser
- val argument: Argument[H]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def canEqual(obj: Any): Boolean
- Definition Classes
- ConsParser → Equals
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def complete(args: Seq[String], index: Int, completer: Completer[::[H, T]], stopAtFirstUnrecognized: Boolean, ignoreUnrecognized: Boolean): List[CompletionItem]
- Definition Classes
- Parser
- def defaultIgnoreUnrecognized: Boolean
- Definition Classes
- Parser
- def defaultNameFormatter: Formatter[Name]
- Definition Classes
- Parser
- def defaultStopAtFirstUnrecognized: Boolean
- Definition Classes
- Parser
- final def detailedParse(args: Seq[String], stopAtFirstUnrecognized: Boolean, ignoreUnrecognized: Boolean): Either[Error, (::[H, T], RemainingArgs)]
- Definition Classes
- Parser
- final def detailedParse(args: Seq[String], stopAtFirstUnrecognized: Boolean): Either[Error, (::[H, T], RemainingArgs)]
- Definition Classes
- Parser
- final def detailedParse(args: Seq[String]): Either[Error, (::[H, T], RemainingArgs)]
Keeps the remaining args before and after a possible -- separated
Keeps the remaining args before and after a possible -- separated
- Definition Classes
- Parser
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(obj: Any): Boolean
- Definition Classes
- ConsParser → Equals → AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def get(d: D, nameFormatter: Formatter[Name]): Either[Error, ::[H, T]]
Get the final result from the final intermediate value.
Get the final result from the final intermediate value.
Typically fails if some mandatory arguments were not specified, so are missing in
d
, preventing building aT
out of it.- returns
in case of success, a
T
wrapped in scala.Right; else, an error message, wrapped in caseapp.core.Error and scala.Left
- Definition Classes
- ConsParser → Parser
- final def get(d: D): Either[Error, ::[H, T]]
Get the final result from the final intermediate value.
Get the final result from the final intermediate value.
Typically fails if some mandatory arguments were not specified, so are missing in
d
, preventing building aT
out of it.- returns
in case of success, a
T
wrapped in scala.Right; else, an error message, wrapped in caseapp.core.Error and scala.Left
- Definition Classes
- Parser
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- ConsParser → AnyRef → Any
- def ignoreUnrecognized: Aux[::[H, T], D]
- Definition Classes
- Parser
- def init: D
Initial value used to accumulate parsed arguments.
Initial value used to accumulate parsed arguments.
- Definition Classes
- ConsParser → Parser
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def map[U](f: (::[H, T]) => U): Aux[U, D]
- Definition Classes
- Parser
- def mapHead[I](f: (H) => I): Aux[::[I, T], D]
- def nameFormatter(f: Formatter[Name]): Aux[::[H, T], D]
- Definition Classes
- Parser
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def parse(args: Seq[String]): Either[Error, (::[H, T], Seq[String])]
- Definition Classes
- Parser
- def productArity: Int
- Definition Classes
- ConsParser → Product
- def productElement(n: Int): Any
- Definition Classes
- ConsParser → Product
- def productElementName(n: Int): String
- Definition Classes
- ConsParser → Product
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def productIterator: Iterator[Any]
- Definition Classes
- Product
- def productPrefix: String
- Definition Classes
- ConsParser → Product
- final def scan(args: Seq[String], stopAtFirstUnrecognized: Boolean, ignoreUnrecognized: Boolean): (Either[(Error, Either[D, ::[H, T]]), (::[H, T], RemainingArgs)], List[Step])
- Definition Classes
- Parser
- def step(args: List[String], index: Int, d: ::[Option[H], (tail)#D], nameFormatter: Formatter[Name]): Either[(Error, Arg, List[String]), Option[(D, Arg, List[String])]]
Process the next argument.
Process the next argument.
If some arguments were successfully processed (third case in return below), the returned remaining argument sequence must be shorter than the passed
args
.This method doesn't fully process
args
. It tries just to parse *one* argument (typically one option--foo
and its valuebar
, so two elements fromargs
- it can also be only one element in case of a flag), if possible. If you want to fully process a sequence of arguments, seeparse
ordetailedParse
.- returns
if no argument were parsed,
Right(None)
; if an error occurred, an error message wrapped in caseapp.core.Error and scala.Left; else the next intermediate value and the remaining arguments wrapped in scala.Some and scala.Right.
- Definition Classes
- ConsParser → Parser
- def step(args: List[String], index: Int, d: D): Either[(Error, Arg, List[String]), Option[(D, Arg, List[String])]]
- Definition Classes
- Parser
- def stopAtFirstUnrecognized: Aux[::[H, T], D]
- Definition Classes
- Parser
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val tail: Aux[T, DT]
- def toString(): String
- Definition Classes
- ConsParser → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withArgument(argument: Argument[H]): ConsParser[H, T, DT]
- def withDefaultOrigin(origin: String): Aux[::[H, T], D]
- Definition Classes
- ConsParser → Parser
- final def withFullHelp: Parser[WithFullHelp[::[H, T]]]
- Definition Classes
- Parser
- final def withHelp: Parser[WithHelp[::[H, T]]]
Creates a Parser accepting help / usage arguments, out of this one.
- def withTail(tail: Aux[T, DT]): ConsParser[H, T, DT]