Class ArgSpec

java.lang.Object
com.codename1.cli.ArgSpec
Direct Known Subclasses:
OptionSpec, PositionalParamSpec

public abstract class ArgSpec extends Object
What an option and a positional parameter have in common.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The most values one occurrence takes; Integer.MAX_VALUE when unbounded.
    int
    The fewest values one occurrence takes.
    The value used when the argument is absent, or null.
    The help text.
    boolean
    Whether this is a boolean that takes no value.
    boolean
    Whether the help leaves it out.
    boolean
    Whether the field holds several values: an array or a list.
    The placeholder the help prints for the value, or null for the default.
    boolean
    Whether a command line without it is an error.
    int
    The number the generated binding knows this argument by.
    The separator that splits one value into several, or null.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.