final class ConsCommandParser[H, T <: Coproduct] extends CommandParser[:+:[H, T]] with Product with Serializable
- Alphabetic
- By Inheritance
- ConsCommandParser
- Serializable
- Serializable
- Product
- Equals
- CommandParser
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ConsCommandParser(name: Seq[String], parser: parser.Parser[H], tail: CommandParser[T])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
canEqual(obj: Any): Boolean
- Definition Classes
- ConsCommandParser → Equals
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
commandMap: Map[Seq[String], parser.Parser[:+:[H, T]]]
- Definition Classes
- ConsCommandParser → CommandParser
-
final
def
detailedParse[D](args: Seq[String])(implicit beforeCommandParser: parser.Parser[D]): Either[Error, (D, Seq[String], Option[Either[Error, (Seq[String], :+:[H, T], RemainingArgs)]])]
Parse arguments.
Parse arguments.
Like
parse
, but keeps the non option arguments in a caseapp.core.RemainingArgs.- returns
in case of error, an caseapp.core.Error, wrapped in scala.Left; in case of success, a
D
, the non option arguments, wrapped in a scala.Right, along with the result of parsing the specified command if any.
- Definition Classes
- CommandParser
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(obj: Any): Boolean
- Definition Classes
- ConsCommandParser → Equals → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(command: Seq[String]): Option[parser.Parser[:+:[H, T]]]
Check if this caseapp.core.commandparser.CommandParser accepts a command, and return its caseapp.core.parser.Parser if it does.
Check if this caseapp.core.commandparser.CommandParser accepts a command, and return its caseapp.core.parser.Parser if it does.
- returns
in case of success,
Parser[T]
ofcommand
, wrapped in scala.Some; scala.None in case of failure
- Definition Classes
- CommandParser
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- ConsCommandParser → AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
map[U](f: (:+:[H, T]) ⇒ U): CommandParser[U]
- Definition Classes
- CommandParser
- def mapHead[I](f: (H) ⇒ I): CommandParser[:+:[I, T]]
- val name: Seq[String]
-
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[D](args: Seq[String])(implicit beforeCommandParser: parser.Parser[D]): Either[Error, (D, Seq[String], Option[Either[Error, (Seq[String], :+:[H, T], Seq[String])]])]
Parse arguments.
Parse arguments.
Arguments before any command are parsed with
beforeCommandParser
as aD
.- returns
in case of error, an caseapp.core.Error, wrapped in scala.Left; in case of success, a
D
, the non option arguments, wrapped in a scala.Right, along with the result of parsing the specified command if any.
- Definition Classes
- CommandParser
- val parser: parser.Parser[H]
-
def
productArity: Int
- Definition Classes
- ConsCommandParser → Product
-
def
productElement(n: Int): Any
- Definition Classes
- ConsCommandParser → Product
-
def
productIterator: Iterator[Any]
- Definition Classes
- Product
-
def
productPrefix: String
- Definition Classes
- ConsCommandParser → Product
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val tail: CommandParser[T]
-
def
toString(): String
- Definition Classes
- ConsCommandParser → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
withHelp: CommandParser[WithHelp[:+:[H, T]]]
Creates a CommandParser accepting help / usage arguments, out of this one.
Creates a CommandParser accepting help / usage arguments, out of this one.
- Definition Classes
- CommandParser
- def withName(name: Seq[String]): ConsCommandParser[H, T]
- def withParser(parser: parser.Parser[H]): ConsCommandParser[H, T]
- def withTail(tail: CommandParser[T]): ConsCommandParser[H, T]