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
- Returns:
- the
Listof aliases (option name).
-
getIndex
int getIndex()- Returns:
- the index to define the order of
valuesor value options. Will be-1for no index.
-
hasIndex
default boolean hasIndex()- Returns:
trueif theindexis greater or equal to zero,falseotherwise (-1).
-
isMandatory
boolean isMandatory()- Returns:
trueifmandatory,falseotherwise.
-
isOption
boolean isOption()- Returns:
trueif option (e.g. "-o" or "--option"),falseotherwise.
-
isValue
boolean isValue()- Returns:
trueif a user specified value (neither anoptionnor a static command keyword),falseotherwise.
-
isFlag
boolean isFlag()- Returns:
truein case of a flag (boolean property),falseotherwise.
-
isWildcard
boolean isWildcard()- Returns:
trueifwildcard,falseotherwise.
-
isVararg
boolean isVararg()- Returns:
trueif this is a vararg property (multivalue),falseotherwise.
-
isKeyword
boolean isKeyword()
-