class OptionDef[A, C] extends AnyRef
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- OptionDef
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new OptionDef(parser: OptionParser[C], kind: OptionDefKind, name: String)(implicit arg0: Read[A])
- new OptionDef(_parser: OptionParser[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])(implicit arg0: Read[A])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def abbr(x: String): OptionDef[A, C]
Adds short option -x.
- def action(f: (A, C) ⇒ C): OptionDef[A, C]
Adds a callback function.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def children(xs: OptionDef[_, C]*): OptionDef[A, C]
Adds opt/arg under this command.
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws(classOf[java.lang.CloneNotSupportedException])
- def desc: String
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def foreach(f: (A) ⇒ Unit): OptionDef[A, C]
Adds a callback function.
- def fullName: String
- final def getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getFallback: A
- def getMaxOccurs: Int
- def getMinOccurs: Int
- def hasFallback: Boolean
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hidden(): OptionDef[A, C]
Hides the option in any usage text.
- def isHidden: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def keyName(x: String): OptionDef[A, C]
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.
- def maxOccurs(n: Int): OptionDef[A, C]
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. - val name: String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def optional(): OptionDef[A, C]
Changes the option to be optional.
- def required(): OptionDef[A, C]
Requires the option to appear at least once.
- def shortDescription: String
- def shortOpt: Option[String]
- final def synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def text(x: String): OptionDef[A, C]
Adds description in the usage text.
- def toString(): String
- Definition Classes
- OptionDef → AnyRef → Any
- def unbounded(): OptionDef[A, C]
Allows the argument to appear multiple times.
- def validate(f: (A) ⇒ Either[String, Unit]): OptionDef[A, C]
Adds custom validation.
- def valueName: Option[String]
- def valueName(x: String): OptionDef[A, C]
Adds value name used in the usage text.
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws(classOf[java.lang.InterruptedException])
- def withFallback(to: () ⇒ A): OptionDef[A, C]
provides a default to fallback to, e.g.
provides a default to fallback to, e.g. for System.getenv