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

public abstract class ArgSpec

  1. Object
  2. ArgSpec

Known subtypesOptionSpec, PositionalParamSpec

What an option and a positional parameter have in common.

Methods

public int slot()The number the generated binding knows this argument by.
public String description()The help text.
public String paramLabel()The placeholder the help prints for the value, or null for the default.
public boolean flag()Whether this is a boolean that takes no value.
public boolean required()Whether a command line without it is an error.
public int arityMin()The fewest values one occurrence takes.
public int arityMax()The most values one occurrence takes; Integer.MAX_VALUE when unbounded.
public boolean multiple()Whether the field holds several values: an array or a list.
public String defaultValue()The value used when the argument is absent, or null.
public String split()The separator that splits one value into several, or null.
public boolean hidden()Whether the help leaves it out.

Inherited methods

Method details

slot

public int slot()
The number the generated binding knows this argument by.

description

public String description()
The help text.

paramLabel

public String paramLabel()
The placeholder the help prints for the value, or null for the default.

flag

public boolean flag()
Whether this is a boolean that takes no value.

required

public boolean required()
Whether a command line without it is an error.

arityMin

public int arityMin()
The fewest values one occurrence takes.

arityMax

public int arityMax()
The most values one occurrence takes; Integer.MAX_VALUE when unbounded.

multiple

public boolean multiple()
Whether the field holds several values: an array or a list.

defaultValue

public String defaultValue()
The value used when the argument is absent, or null.

split

public String split()
The separator that splits one value into several, or null.

hidden

public boolean hidden()
Whether the help leaves it out.