OptionDef

replpp.shaded.scopt.OptionDef
class OptionDef[A, C](_id: Int, _kind: OptionDefKind, _name: String, _shortOpt: Option[String], _keyName: Option[String], _valueName: Option[String], _desc: String, _action: (A, C) => C, _validations: Seq[A => Either[String, Unit]], _configValidations: Seq[C => Either[String, Unit]], _parentId: Option[Int], _minOccurs: Int, _maxOccurs: Int, _isHidden: Boolean, _fallback: Option[() => A], _defCallback: OptionDefCallback[C])(implicit evidence$1: Read[A])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Constructors

def this(kind: OptionDefKind, name: String, defCallback: OptionDefCallback[C])
def this(kind: OptionDefKind, name: String)

Concrete methods

def abbr(x: String): OptionDef[A, C]

Adds short option -x.

Adds short option -x.

Attributes

def action(f: (A, C) => C): OptionDef[A, C]

Adds a callback function.

Adds a callback function.

Attributes

def children(xs: OptionDef[_, C]*): OptionDef[A, C]

Adds opt/arg under this command.

Adds opt/arg under this command.

Attributes

def desc: String
def foreach(f: A => Unit): OptionDef[A, C]

Adds a callback function.

Adds a callback function.

Attributes

def fullName: String
def getFallback: A
def getMaxOccurs: Int
def getMinOccurs: Int
def hasFallback: Boolean
def hidden(): OptionDef[A, C]

Hides the option in any usage text.

Hides the option in any usage text.

Attributes

def isHidden: Boolean
def keyName(x: String): OptionDef[A, C]

Adds key name used in the usage text.

Adds key name used in the usage text.

Attributes

def keyValueName(k: String, v: String): OptionDef[A, C]

Adds key and value names used in the usage text.

Adds key and value names used in the usage text.

Attributes

def maxOccurs(n: Int): OptionDef[A, C]

Allows the argument to appear at most n times.

Allows the argument to appear at most n times.

Attributes

def minOccurs(n: Int): OptionDef[A, C]

Requires the option to appear at least n times.

Requires the option to appear at least n times.

Attributes

def optional(): OptionDef[A, C]

Changes the option to be optional.

Changes the option to be optional.

Attributes

def required(): OptionDef[A, C]

Requires the option to appear at least once.

Requires the option to appear at least once.

Attributes

def shortDescription: String
def shortOpt: Option[String]
def text(x: String): OptionDef[A, C]

Adds description in the usage text.

Adds description in the usage text.

Attributes

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 unbounded(): OptionDef[A, C]

Allows the argument to appear multiple times.

Allows the argument to appear multiple times.

Attributes

def validate(f: A => Either[String, Unit]): OptionDef[A, C]

Adds custom validation.

Adds custom validation.

Attributes

def valueName(x: String): OptionDef[A, C]

Adds value name used in the usage text.

Adds value name used in the usage text.

Attributes

def valueName: Option[String]
def withFallback(to: () => A): OptionDef[A, C]

provides a default to fallback to, e.g. for System.getenv

provides a default to fallback to, e.g. for System.getenv

Attributes

Concrete fields

val name: String