Class CommandOption.DefaultCommandOption
java.lang.Object
org.springframework.shell.command.CommandOption.DefaultCommandOption
- All Implemented Interfaces:
CommandOption
- Enclosing interface:
- CommandOption
Default implementation of
CommandOption.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.shell.command.CommandOption
CommandOption.DefaultCommandOption -
Constructor Summary
ConstructorsConstructorDescriptionDefaultCommandOption(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) -
Method Summary
Modifier 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.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.
-
Constructor Details
-
DefaultCommandOption
-
-
Method Details
-
getLongNames
Description copied from interface:CommandOptionGets a long names of an option.- Specified by:
getLongNamesin interfaceCommandOption- Returns:
- long names of an option
-
getShortNames
Description copied from interface:CommandOptionGets a short names of an option.- Specified by:
getShortNamesin interfaceCommandOption- Returns:
- short names of an option
-
getDescription
Description copied from interface:CommandOptionGets a description of an option.- Specified by:
getDescriptionin interfaceCommandOption- Returns:
- description of an option
-
getType
public org.springframework.core.ResolvableType getType()Description copied from interface:CommandOptionGets aResolvableTypeof an option.- Specified by:
getTypein interfaceCommandOption- Returns:
- type of an option
-
isRequired
public boolean isRequired()Description copied from interface:CommandOptionGets a flag if option is required.- Specified by:
isRequiredin interfaceCommandOption- Returns:
- the required flag
-
getDefaultValue
Description copied from interface:CommandOptionGets a default value of an option.- Specified by:
getDefaultValuein interfaceCommandOption- Returns:
- the default value
-
getPosition
public int getPosition()Description copied from interface:CommandOptionGets a positional value.- Specified by:
getPositionin interfaceCommandOption- Returns:
- the positional value
-
getArityMin
public int getArityMin()Description copied from interface:CommandOptionGets a minimum arity.- Specified by:
getArityMinin interfaceCommandOption- Returns:
- the minimum arity
-
getArityMax
public int getArityMax()Description copied from interface:CommandOptionGets a maximum arity.- Specified by:
getArityMaxin interfaceCommandOption- Returns:
- the maximum arity
-
getLabel
Description copied from interface:CommandOptionGets a label.- Specified by:
getLabelin interfaceCommandOption- Returns:
- the label
-
getCompletion
Description copied from interface:CommandOptionGets a completion function.- Specified by:
getCompletionin interfaceCommandOption- Returns:
- the completion function
-