Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
def
apply(): Unit
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
delayedInit(body: ⇒ Unit): Unit
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
remainingArgs: Seq[String]
-
def
setRemainingArgs(remainingArgs: Seq[String], extraArgs: Seq[String]): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from DelayedInit
Inherited from AnyRef
Inherited from Any
Have a case class extend this trait for its fields to become command line arguments, and its body the core of your app using these.
Extends
DelayedInit
, so that the body of the case class gets called later.Remaining arguments are accessible via the method
remainingArgs
.Example
In the example above,
FooApp
now has amain
method, that parses the arguments it is given, and matches these to the fieldsi
(-i 2
givesi
the value2
) andfoo
(--foo ab
givesfoo
the value"ab"
) ofFoo
. It also accepts--help
/-h
/--usage
arguments, and prints help or usage messages when these are present.(Since version 1.2.0-M2) See CaseApp instead