CommandLine

org.specs2.main.CommandLine
See theCommandLine companion object
case class CommandLine(_arguments: Seq[String]) extends ShowArgs

Command-line arguments

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait ShowArgs
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def arguments: Seq[String]
def bool(name: String): Option[Boolean]
def boolOr(name: String, defaultValue: Boolean): Boolean
def contains(a: String): Boolean
def directory(name: String): Option[DirectoryPath]
def directoryOr(name: String, defaultValue: DirectoryPath): DirectoryPath
def double(name: String): Option[Double]
def doubleOr(name: String, defaultValue: Double): Double
def file(name: String): Option[FilePath]
def fileOr(name: String, defaultValue: FilePath): FilePath
def filter(included: String*): CommandLine
def filterNot(excluded: String*): CommandLine
def float(name: String): Option[Float]
def floatOr(name: String, defaultValue: Float): Float
def instance[T <: AnyRef](name: String)(using t: ClassTag[T]): Option[T]

try to instantiate a class from its name

try to instantiate a class from its name

Attributes

def int(name: String): Option[Int]
def intOr(name: String, defaultValue: Int): Int
def isDefined(name: String): Boolean
def isSet(name: String): Boolean

Attributes

Returns

true if a specific string is present in the list of arguments from the command line or if an attribute with that name (and any value) has been defined

def long(name: String): Option[Long]
def longOr(name: String, defaultValue: Long): Long
def map(name: String): Option[Map[String, String]]
def mapOr(name: String, defaultValue: Map[String, String]): Map[String, String]
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def value(name: String): Option[String]

Attributes

Returns

the value for a given attribute attribute names and values are defined in a positional way where an attribute name is always succeeded with an attribute value. For example: name1 value1 name2 value2 values can also be retrieved from system properties set with the regular jvm syntax -Dname=value

def valueOr(name: String, defaultValue: String): String

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def showArg(a: (String, Option[_])): Option[String]

Attributes

Inherited from:
ShowArgs