abstract class CommandParser[T] extends AnyRef
Parses arguments, handling sub-commands.
- Alphabetic
- By Inheritance
- CommandParser
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new CommandParser()
Abstract Value Members
- abstract def commandMap: Map[Seq[String], parser.Parser[T]]
Concrete 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
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
detailedParse[D](args: Seq[String])(implicit beforeCommandParser: parser.Parser[D]): Either[Error, (D, Seq[String], Option[Either[Error, (Seq[String], 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.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- 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[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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def map[U](f: (T) ⇒ U): CommandParser[U]
-
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], 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.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- 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[T]]
Creates a CommandParser accepting help / usage arguments, out of this one.