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])
class Object
trait Matchable
class Any

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.

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

Adds a callback function.

Adds a callback function.

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

Adds opt/arg under this command.

Adds opt/arg under this command.

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

Adds a callback function.

Adds a callback function.

def fullName: String
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.

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.

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.

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.

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.

def optional(): OptionDef[A, C]

Changes the option to be optional.

Changes the option to be optional.

def required(): OptionDef[A, C]

Requires the option to appear at least once.

Requires the option to appear at least once.

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.

override def toString: String
Definition Classes
Any
def unbounded(): OptionDef[A, C]

Allows the argument to appear multiple times.

Allows the argument to appear multiple times.

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

Adds custom validation.

Adds custom validation.

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

Adds value name used in the usage text.

Adds value name used in the usage text.

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

Concrete fields

val name: String