Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.util/CommandLineParser

CommandLineParser

scala.util.CommandLineParser

A utility object to support command line parsing for @main methods

Attributes

Source
CommandLineParser.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type

Members list

Type members

Classlikes

Attributes

Companion
trait
Source
CommandLineParser.scala
Supertypes
classObject
traitMatchable
classAny
Self type
classParseError(validx:Int,valmsg:String) extendsException

An exception raised for an illegal command line

An exception raised for an illegal command line

Value parameters

idx

The index of the argument that's faulty (starting from 0)

msg

The error message

Attributes

Source
CommandLineParser.scala
Supertypes
classException
classThrowable
classObject
traitMatchable
classAny
Show all

Value members

Concrete methods

defparseArgument[T](args:Array[String],n:Int)(usingfs:FromString[T]):T

Parsen'th argument inargs (counting from 0) as a value of typeT

Parsen'th argument inargs (counting from 0) as a value of typeT

Attributes

Throws
ParseError

if argument does not exist or cannot be converted to typeT.

Source
CommandLineParser.scala
defparseRemainingArguments[T](args:Array[String],n:Int)(usingfs:FromString[T]):List[T]

Parse all arguments fromn'th one (counting from 0) as a list of values of typeT

Parse all arguments fromn'th one (counting from 0) as a list of values of typeT

Attributes

Throws
ParseError

if some of the arguments cannot be converted to typeT.

Source
CommandLineParser.scala
defparseString[T](str:String,n:Int)(usingfs:FromString[T]):T

Parse command line arguments, which has indexn, as a value of typeT

Parse command line arguments, which has indexn, as a value of typeT

Attributes

Throws
ParseError

if argument cannot be converted to typeT.

Source
CommandLineParser.scala

Print error message explaining given ParserError

Print error message explaining given ParserError

Attributes

Source
CommandLineParser.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp