Class PositionalParamSpec
java.lang.Object
com.codename1.cli.ArgSpec
com.codename1.cli.PositionalParamSpec
The model of one positional parameter, written by the build from a
CommandLine.Parameters.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ArgSpec
arityMax, arityMin, defaultValue, description, flag, hidden, multiple, paramLabel, required, slot, split
-
Constructor Details
-
PositionalParamSpec
public PositionalParamSpec(int slot, String index, String description, String paramLabel, boolean required, String arity, boolean multiple, String defaultValue, String split, boolean hidden) Creates the model of a positional parameter.
Parameters
-
slot: the number the generated binding knows this parameter by -
index: the positions it takes, as0,1..3or1..* -
description: the help text -
paramLabel: the placeholder printed for it, such as<file> -
required: whether a command line without it is an error -
arity: how many values it takes, or empty for the default -
multiple: true when the field is an array or a list -
defaultValue: the value used when it is absent, or null -
split: a separator that splits one value into several, or null -
hidden: whether it is left out of the help
-
-
-
Method Details
-
indexFrom
public int indexFrom()The first position this parameter takes. -
indexTo
public int indexTo()The last position this parameter takes, orInteger.MAX_VALUEfor an open range.
-