clam.derivation

Members list

Concise view

Type members

Classlikes

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class Def[+A](pdefs: Seq[ParamDef], parse: (Command, Context, Result) => Result[A])

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Attributes

Graph
Supertypes
trait ReaderApi
class Object
trait Matchable
class Any
Known subtypes
object default.type
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object default.type
class param(val name: String | Null, val aliases: Seq[String], val endOfNamed: Boolean, val interactiveCompleter: String => Seq[String] | Null, val standaloneCompleter: BashCompleter | Null, val argName: String | Null, val reader: Reader[_] | Null) extends StaticAnnotation

Annotate to scala parameters to customize or override cli parameter derivation.

Annotate to scala parameters to customize or override cli parameter derivation.

Since this annotation will be set by user code, in order to reduce boilerplate, optional parameters of this class are declared as A | Null instead of Option[A], with a default null value. Thus, a user who wishes to set a parameter can simply assign it without having to wrap it in a Some. E.g. @param(name = "foo"). Any unset parameter means "use the default behavior from derivation".

Attributes

aliases

Additional names by which this parameter can be set.

argName

The name of the argument given to a named arg. E.g. <path> in --base-dir=<path>.

endOfNamed

If set, then all subsequent parameters will be treated as positional, regardless of their name.

interactiveCompleter

A function invoked during command completion. Given a partially types argument, returns all possible value for said argument.

name

Set the name explicitly rather than derive it.

reader

Override the reader used to used to deserialize a string to a scala value. Note that the type of the reader must match the type of scala parameter definition that this annotation is applied to.

standaloneCompleter

A builtin completer when completion is handles by external scripts.

Graph
Supertypes
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any