Interface CliPropertyContainer


public interface CliPropertyContainer
Container with the metadata of a Property from a CliCommand.
Since:
1.0.0
  • Method Details

    • getPropertyName

      String getPropertyName()
      Returns:
      the property name.
    • getSyntax

      String getSyntax()
      Returns:
      the plain syntax for help (e.g. "--locale|-l").
    • getUsage

      String getUsage()
      Returns:
      the usage (e.g. "[--locale|-l ]").
    • getHelp

      String getHelp()
      Returns:
      the help explaining this property to the user.
    • getAliases

      List<String> getAliases()
      Returns:
      the List of aliases (option name).
    • getIndex

      int getIndex()
      Returns:
      the index to define the order of values or value options. Will be -1 for no index.
    • hasIndex

      default boolean hasIndex()
      Returns:
      true if the index is greater or equal to zero, false otherwise (-1).
    • isMandatory

      boolean isMandatory()
      Returns:
      true if mandatory, false otherwise.
    • isOption

      boolean isOption()
      Returns:
      true if option (e.g. "-o" or "--option"), false otherwise.
    • isValue

      boolean isValue()
      Returns:
      true if a user specified value (neither an option nor a static command keyword), false otherwise.
    • isFlag

      boolean isFlag()
      Returns:
      true in case of a flag (boolean property), false otherwise.
    • isWildcard

      boolean isWildcard()
      Returns:
      true if wildcard, false otherwise.
    • isVararg

      boolean isVararg()
      Returns:
      true if this is a vararg property (multivalue), false otherwise.
    • isKeyword

      boolean isKeyword()
      Returns:
      true in case of a command keyword that is a static mandatory argument that is not an option