Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public final class PositionalParamSpec
The model of one positional parameter, written by the build from a
CommandLine.Parameters.Constructors
Methods
public int indexFrom() | The first position this parameter takes. |
public int indexTo() | The last position this parameter takes, or Integer.MAX_VALUE for an open range. |
Inherited methods
From ArgSpec
slot, description, paramLabel, flag, required, arityMin, arityMax, multiple, defaultValue, split, hidden
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
slotint- the number the generated binding knows this parameter by
indexString- the positions it takes, as
0,1..3or1..* descriptionString- the help text
paramLabelString- the placeholder printed for it, such as
<file> requiredboolean- whether a command line without it is an error
arityString- how many values it takes, or empty for the default
multipleboolean- true when the field is an array or a list
defaultValueString- the value used when it is absent, or null
splitString- a separator that splits one value into several, or null
hiddenboolean- 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, or
Integer.MAX_VALUE for an
open range.