Trait

com.github.scli.ParameterParser

CliElement

Related Doc: package ParameterParser

Permalink

sealed trait CliElement extends AnyRef

A trait describing an item encountered on the command line.

During parameter parsing the single items on the command line need to be classified into options, switches, or input parameters. For this purpose, a classification function is used which returns sub classes of this trait. The parser needs to handle the sub classes differently.

This trait also plays a role for error handling: It stores the original key and the raw value of the represented parameter. This information is useful when generating meaningful error messages.

In addition, the position of the corresponding element on the command line can be queried. This is needed by some use cases that override the values of options with values appearing later on the command line.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CliElement
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def index: Int

    Permalink

    Returns the (0-based) index where this element was placed on the command line.

    Returns the (0-based) index where this element was placed on the command line. This makes it possible to sort command line items by their position they have been placed on the command line.

    returns

    the index of this CliElement on the command line

  2. abstract def key: ParameterKey

    Permalink

    Returns the key used for this parameter value on the command line.

    Returns the key used for this parameter value on the command line. While values are stored under the main parameter key, this method allows determining the key the user has specified (which may be an alias).

    returns

    the key used for this CliElement

  3. abstract def value: String

    Permalink

    Returns the raw value of this CliElement as specified by the user.

    Returns the raw value of this CliElement as specified by the user. The value may be transformed during the extraction phase. If transformation fails, it might be useful to have the original value to construct an error message.

    returns

    the value of this CliElement

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  15. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped