Class ArgSpec
java.lang.Object
com.codename1.cli.ArgSpec
- Direct Known Subclasses:
OptionSpec, PositionalParamSpec
What an option and a positional parameter have in common.
-
Method Summary
Modifier and TypeMethodDescriptionintarityMax()The most values one occurrence takes;Integer.MAX_VALUEwhen unbounded.intarityMin()The fewest values one occurrence takes.The value used when the argument is absent, or null.The help text.booleanflag()Whether this is a boolean that takes no value.booleanhidden()Whether the help leaves it out.booleanmultiple()Whether the field holds several values: an array or a list.The placeholder the help prints for the value, or null for the default.booleanrequired()Whether a command line without it is an error.intslot()The number the generated binding knows this argument by.split()The separator that splits one value into several, or null.
-
Method Details
-
slot
public int slot()The number the generated binding knows this argument by. -
description
The help text. -
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_VALUEwhen unbounded. -
multiple
public boolean multiple()Whether the field holds several values: an array or a list. -
defaultValue
The value used when the argument is absent, or null. -
split
The separator that splits one value into several, or null.
-