Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public final class PositionalParamSpec

  1. Object
  2. ArgSpec
  3. PositionalParamSpec
The model of one positional parameter, written by the build from a CommandLine.Parameters.

Constructors

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.

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

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 int
the number the generated binding knows this parameter by
index String
the positions it takes, as 0, 1..3 or 1..*
description String
the help text
paramLabel String
the placeholder printed for it, such as <file>
required boolean
whether a command line without it is an error
arity String
how many values it takes, or empty for the default
multiple boolean
true when the field is an array or a list
defaultValue String
the value used when it is absent, or null
split String
a separator that splits one value into several, or null
hidden boolean
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.