Scala Compiler2.12.21 < Back
 

# Packages

-  package root

  The Scala compiler and reflection APIs.

  The Scala compiler and reflection APIs.

  Definition Classes
    root
-  package scala
  Definition Classes
    root
-  package tools
  Definition Classes
    scala
-  package cmd
  Definition Classes
    tools
- CommandLine
- CommandLineConfig
- CommandLineParser
- FromString
- Instance
- Interpolation
- Meta
- Opt
- Property
- PropertyMapper
- Reference
- Spec

c

scala.tools.cmd

# CommandLine 

###

#### class CommandLine extends CommandLineConfig

An instance of a command line, parsed according to a Spec.

Source
  CommandLine.scala

Linear Supertypes
CommandLineConfig, AnyRef, Any
Known Subclasses
SpecCommandLine
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. CommandLine
2. CommandLineConfig
3. AnyRef
4. Any

Implicitly

1. by any2stringadd
2. by StringFormat
3. by Ensuring
4. by ArrowAssoc

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new CommandLine(spec: Reference, args: Array[String])
2.  new CommandLine(spec: Reference, line: String)
3.  new CommandLine(spec: Reference, originalArgs: List[String])

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  def +(other: String): String
   Implicit
     This member is added by an implicit conversion from CommandLine to any2stringadd[CommandLine] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd
4.  def ->[B](y: B): (CommandLine, B)
   Implicit
     This member is added by an implicit conversion from CommandLine to ArrowAssoc[CommandLine] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()
5.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
6.  val Terminator: String
7.  val ValueForUnaryOption: String
8.  def apply(arg: String): String
9.  lazy val argMap: Map[String, String]

   argMap is option -> argument (or "true" if it is a unary argument) residualArgs are what is left after removing the options and their args.

10.  final def asInstanceOf[T0]: T0
    Definition Classes
      Any
11.  def clone(): AnyRef
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( ... ) @native()
12.  def enforceArity: Boolean
    Definition Classes
      CommandLineConfig
13.  def ensuring(cond: (CommandLine) ⇒ Boolean, msg: ⇒ Any): CommandLine
    Implicit
      This member is added by an implicit conversion from CommandLine to Ensuring[CommandLine] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
14.  def ensuring(cond: (CommandLine) ⇒ Boolean): CommandLine
    Implicit
      This member is added by an implicit conversion from CommandLine to Ensuring[CommandLine] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
15.  def ensuring(cond: Boolean, msg: ⇒ Any): CommandLine
    Implicit
      This member is added by an implicit conversion from CommandLine to Ensuring[CommandLine] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
16.  def ensuring(cond: Boolean): CommandLine
    Implicit
      This member is added by an implicit conversion from CommandLine to Ensuring[CommandLine] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
17.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
18.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
19.  def errorFn(msg: String): Unit
20.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
21.  def get(arg: String): Option[String]
22.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
23.  def getOrElse(arg: String, orElse: ⇒ String): String
24.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
25.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
26.  def isSet(arg: String): Boolean
27.  def mapForUnary(opt: String): Map[String, String]
28.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
29.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
30.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
31.  def onlyKnownOptions: Boolean
    Definition Classes
      CommandLineConfig
32.  val originalArgs: List[String]
33.  lazy val residualArgs: List[String]

    argMap is option -> argument (or "true" if it is a unary argument) residualArgs are what is left after removing the options and their args.

34.  val spec: Reference
35.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
36.  def toString(): String
    Definition Classes
      CommandLine → AnyRef → Any
37.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
38.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
39.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... ) @native()
40.  def →[B](y: B): (CommandLine, B)
    Implicit
      This member is added by an implicit conversion from CommandLine to ArrowAssoc[CommandLine] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
      ArrowAssoc

### Deprecated Value Members

1.  def formatted(fmtstr: String): String
   Implicit
     This member is added by an implicit conversion from CommandLine to StringFormat[CommandLine] performed by method StringFormat in scala.Predef.
   Definition Classes
     StringFormat
   Annotations
     @deprecated @inline()
   Deprecated

     (Since version 2.12.16) Use `formatString.format(value)` instead of `value.formatted(formatString)`, or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters.

### Inherited from CommandLineConfig

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion any2stringadd from CommandLine to any2stringadd[CommandLine]

### Inherited by implicit conversion StringFormat from CommandLine to StringFormat[CommandLine]

### Inherited by implicit conversion Ensuring from CommandLine to Ensuring[CommandLine]

### Inherited by implicit conversion ArrowAssoc from CommandLine to ArrowAssoc[CommandLine]

### Ungrouped