CompilerOptionsHost

abstract class CompilerOptionsHost(source)

A utility base class that allows declaring CompilerOptions, which include both a CLI option and a CompilerConfiguration property.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun flag(name: String, defaultValue: Boolean, description: String): Lazy<CompilerOption.SingularWithDefault<Boolean>>

An optional boolean flag parameter with a default. The argument values are true or false (using toBooleanLenient). If it cannot be converted to a boolean, the default is used.

fun flag(name: String, description: String, required: Boolean = true): Lazy<CompilerOption.Singular<Boolean>>

A boolean flag parameter with no default. Required by default. The argument values are true or false (using toBooleanLenient). If it cannot be converted to a boolean, it is ignored.

Link copied to clipboard
fun <K : Any, V : Any> keyed(name: String, valueDescription: String, description: String, required: Boolean = true, transform: (String) -> Pair<K, V>?): Lazy<CompilerOption.Keyed<K, V>>

A keyed (i.e. map) parameter.

Link copied to clipboard
fun <T> repeated(name: String, valueDescription: String, description: String, required: Boolean = true, transform: (String) -> T?): Lazy<CompilerOption.Repeated<T>>

A repeated parameter.

Link copied to clipboard
fun repeatedString(name: String, valueDescription: String, description: String, required: Boolean = true): Lazy<CompilerOption.Repeated<String>>

A repeated string parameter.

Link copied to clipboard
fun <T> singular(name: String, defaultValue: T, valueDescription: String, description: String, transform: (String) -> T?): Lazy<CompilerOption.SingularWithDefault<T>>

A single optional parameter with a default.

fun <T> singular(name: String, valueDescription: String, description: String, required: Boolean = true, transform: (String) -> T?): Lazy<CompilerOption.Singular<T & Any>>

A single parameter with no default. Required by default.

Link copied to clipboard
fun singularString(name: String, valueDescription: String, description: String, required: Boolean = true): Lazy<CompilerOption.Singular<String>>

A single string parameter with no default. Required by default.

fun singularString(name: String, defaultValue: String, valueDescription: String, description: String): Lazy<CompilerOption.SingularWithDefault<String>>

A single optional string parameter with a default.