public interface CommandOption
| Modifier and Type | Interface and Description |
|---|---|
static class |
CommandOption.DefaultCommandOption
Default implementation of
CommandOption. |
| Modifier and Type | Method and Description |
|---|---|
int |
getArityMax()
Gets a maximum arity.
|
int |
getArityMin()
Gets a minimum arity.
|
CompletionResolver |
getCompletion()
Gets a completion function.
|
String |
getDefaultValue()
Gets a default value of an option.
|
String |
getDescription()
Gets a description of an option.
|
String |
getLabel()
Gets a label.
|
String[] |
getLongNames()
Gets a long names of an option.
|
int |
getPosition()
Gets a positional value.
|
Character[] |
getShortNames()
Gets a short names of an option.
|
org.springframework.core.ResolvableType |
getType()
Gets a
ResolvableType of an option. |
boolean |
isRequired()
Gets a flag if option is required.
|
static CommandOption |
of(String[] longNames,
Character[] shortNames,
String description)
Gets an instance of a default
CommandOption. |
static CommandOption |
of(String[] longNames,
Character[] shortNames,
String description,
org.springframework.core.ResolvableType type)
Gets an instance of a default
CommandOption. |
static CommandOption |
of(String[] longNames,
Character[] shortNames,
String description,
org.springframework.core.ResolvableType type,
boolean required,
String defaultValue,
Integer position,
Integer arityMin,
Integer arityMax,
String label,
CompletionResolver completion)
Gets an instance of a default
CommandOption. |
String[] getLongNames()
Character[] getShortNames()
String getDescription()
org.springframework.core.ResolvableType getType()
ResolvableType of an option.boolean isRequired()
String getDefaultValue()
int getPosition()
int getArityMin()
int getArityMax()
String getLabel()
CompletionResolver getCompletion()
static CommandOption of(String[] longNames, Character[] shortNames, String description)
CommandOption.longNames - the long namesshortNames - the short namesdescription - the descriptionstatic CommandOption of(String[] longNames, Character[] shortNames, String description, org.springframework.core.ResolvableType type)
CommandOption.longNames - the long namesshortNames - the short namesdescription - the descriptiontype - the typestatic CommandOption of(String[] longNames, Character[] shortNames, String description, org.springframework.core.ResolvableType type, boolean required, String defaultValue, Integer position, Integer arityMin, Integer arityMax, String label, CompletionResolver completion)
CommandOption.longNames - the long namesshortNames - the short namesdescription - the descriptiontype - the typerequired - the required flagdefaultValue - the default valueposition - the position valuearityMin - the min arityarityMax - the max aritylabel - the labelcompletion - the completionCopyright © 2023. All rights reserved.