Interface CommandOption
- All Known Implementing Classes:
- CommandOption.DefaultCommandOption
public interface CommandOption
Interface representing an option in a command.
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionintGets a maximum arity.intGets a minimum arity.Gets a completion function.Gets a default value of an option.Gets a description of an option.getLabel()Gets a label.String[]Gets a long names of an option.String[]Gets a modified long names of an option.intGets a positional value.Gets a short names of an option.org.springframework.core.ResolvableTypegetType()Gets aResolvableTypeof an option.booleanGets a flag if option is required.static CommandOptionGets an instance of a defaultCommandOption.static CommandOptionof(String[] longNames, Character[] shortNames, String description, org.springframework.core.ResolvableType type) Gets an instance of a defaultCommandOption.static CommandOptionof(String[] longNames, String[] longNamesModified, 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 defaultCommandOption.
- 
Method Details- 
getLongNamesString[] getLongNames()Gets a long names of an option.- Returns:
- long names of an option
 
- 
getLongNamesModifiedString[] getLongNamesModified()Gets a modified long names of an option. Set within a command registration if option name modifier were used to have an info about original names.- Returns:
- modified long names of an option
 
- 
getShortNamesCharacter[] getShortNames()Gets a short names of an option.- Returns:
- short names of an option
 
- 
getDescriptionString getDescription()Gets a description of an option.- Returns:
- description of an option
 
- 
getTypeorg.springframework.core.ResolvableType getType()Gets aResolvableTypeof an option.- Returns:
- type of an option
 
- 
isRequiredboolean isRequired()Gets a flag if option is required.- Returns:
- the required flag
 
- 
getDefaultValueString getDefaultValue()Gets a default value of an option.- Returns:
- the default value
 
- 
getPositionint getPosition()Gets a positional value.- Returns:
- the positional value
 
- 
getArityMinint getArityMin()Gets a minimum arity.- Returns:
- the minimum arity
 
- 
getArityMaxint getArityMax()Gets a maximum arity.- Returns:
- the maximum arity
 
- 
getLabelString getLabel()Gets a label.- Returns:
- the label
 
- 
getCompletionCompletionResolver getCompletion()Gets a completion function.- Returns:
- the completion function
 
- 
ofGets an instance of a defaultCommandOption.- Parameters:
- longNames- the long names
- shortNames- the short names
- description- the description
- Returns:
- default command option
 
- 
ofstatic CommandOption of(String[] longNames, Character[] shortNames, String description, org.springframework.core.ResolvableType type) Gets an instance of a defaultCommandOption.- Parameters:
- longNames- the long names
- shortNames- the short names
- description- the description
- type- the type
- Returns:
- default command option
 
- 
ofstatic CommandOption of(String[] longNames, String[] longNamesModified, 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 defaultCommandOption.- Parameters:
- longNames- the long names
- longNamesModified- the modified long names
- shortNames- the short names
- description- the description
- type- the type
- required- the required flag
- defaultValue- the default value
- position- the position value
- arityMin- the min arity
- arityMax- the max arity
- label- the label
- completion- the completion
- Returns:
- default command option
 
 
-