scoop:scoop.cli:0.1.0
src/annotations.scoop
Selected production source · src/annotations.scoop
1
package scoop.cli3
/**4
* Describes a named value option on a field or property. Help-related text only affects5
* presentation; missing values use the model constructor's defaults.6
*/7
@Target([AnnotationTarget.Field, AnnotationTarget.Property])8
public annotation class CliOption(9
val names: Array<String> = [], val help: String = "",10
val valueName: String = "", val defaultText: String = "", val required: Boolean = false11
)13
/**14
* Describes positive and optional negative spellings for a Boolean field or property. Flags15
* consume no separate value token.16
*/17
@Target([AnnotationTarget.Field, AnnotationTarget.Property])18
public annotation class CliFlag(19
val names: Array<String> = [], val negativeNames: Array<String> = [],20
val help: String = "", val defaultText: String = "", val required: Boolean = false21
)23
/**24
* Assigns a field or property a zero-based positional argument index and its help presentation.25
*/26
@Target([AnnotationTarget.Field, AnnotationTarget.Property])27
public annotation class CliArgument(28
val position: Long, val help: String = "", val valueName: String = "", val defaultText: String = "", val required: Boolean = false29
)31
/** Exclude this member from the generated argument layout. */32
@Target([AnnotationTarget.Field, AnnotationTarget.Property])33
public annotation class CliIgnore35
internal fun configuration(message: String): Nothing = throw IllegalArgumentException(Some(message))