Class CommandOption.DefaultCommandOption

java.lang.Object
org.springframework.shell.command.CommandOption.DefaultCommandOption
All Implemented Interfaces:
CommandOption
Enclosing interface:
CommandOption

public static class CommandOption.DefaultCommandOption extends Object implements CommandOption
Default implementation of CommandOption.
  • Constructor Details

  • Method Details

    • getLongNames

      public String[] getLongNames()
      Description copied from interface: CommandOption
      Gets a long names of an option.
      Specified by:
      getLongNames in interface CommandOption
      Returns:
      long names of an option
    • getLongNamesModified

      public String[] getLongNamesModified()
      Description copied from interface: CommandOption
      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.
      Specified by:
      getLongNamesModified in interface CommandOption
      Returns:
      modified long names of an option
    • getShortNames

      public Character[] getShortNames()
      Description copied from interface: CommandOption
      Gets a short names of an option.
      Specified by:
      getShortNames in interface CommandOption
      Returns:
      short names of an option
    • getDescription

      public String getDescription()
      Description copied from interface: CommandOption
      Gets a description of an option.
      Specified by:
      getDescription in interface CommandOption
      Returns:
      description of an option
    • getType

      public org.springframework.core.ResolvableType getType()
      Description copied from interface: CommandOption
      Gets a ResolvableType of an option.
      Specified by:
      getType in interface CommandOption
      Returns:
      type of an option
    • isRequired

      public boolean isRequired()
      Description copied from interface: CommandOption
      Gets a flag if option is required.
      Specified by:
      isRequired in interface CommandOption
      Returns:
      the required flag
    • getDefaultValue

      public String getDefaultValue()
      Description copied from interface: CommandOption
      Gets a default value of an option.
      Specified by:
      getDefaultValue in interface CommandOption
      Returns:
      the default value
    • getPosition

      public int getPosition()
      Description copied from interface: CommandOption
      Gets a positional value.
      Specified by:
      getPosition in interface CommandOption
      Returns:
      the positional value
    • getArityMin

      public int getArityMin()
      Description copied from interface: CommandOption
      Gets a minimum arity.
      Specified by:
      getArityMin in interface CommandOption
      Returns:
      the minimum arity
    • getArityMax

      public int getArityMax()
      Description copied from interface: CommandOption
      Gets a maximum arity.
      Specified by:
      getArityMax in interface CommandOption
      Returns:
      the maximum arity
    • getLabel

      public String getLabel()
      Description copied from interface: CommandOption
      Gets a label.
      Specified by:
      getLabel in interface CommandOption
      Returns:
      the label
    • getCompletion

      public CompletionResolver getCompletion()
      Description copied from interface: CommandOption
      Gets a completion function.
      Specified by:
      getCompletion in interface CommandOption
      Returns:
      the completion function