OptionArgument

class OptionArgument(name: String, required: Boolean = false, defaultValue: String? = null, nullable: Boolean = false, description: String = "", checkValid: (value: String?) -> String? = { null }) : Argument

选项参数.

Author

M8Test, [email protected], https://m8test.com

Constructors

Link copied to clipboard
constructor(name: String, required: Boolean = false, defaultValue: String? = null, nullable: Boolean = false, description: String = "", checkValid: (value: String?) -> String? = { null })

Functions

Link copied to clipboard
open override fun checkValid(value: String?): String?

检查参数值是否合法.

Link copied to clipboard
open override fun getDefaultValue(): String?

获取参数默认值

Link copied to clipboard
open override fun getDescription(): String

获取参数描述信息

Link copied to clipboard
open override fun getName(): String

获取参数名

Link copied to clipboard
open override fun isNullable(): Boolean

获取参数是否可为 null

Link copied to clipboard
open override fun isRequired(): Boolean

获取参数是否为必须的