Class CliArgument

java.lang.Object
io.github.mmm.cli.arg.CliArgument
Direct Known Subclasses:
CliOption, CliValue

public abstract class CliArgument extends Object
A single argument of a main method from a command-line-interface (CLI). A CliArgument is either a CliOption or a CliValue.
Since:
1.0.0
See Also:
  • Field Details

    • END_OPTIONS

      public static final String END_OPTIONS
      The argument to indicate the end of the options. If this string is given as argument, any further arguments are treated as values. This allows to provide CliValues (e.g. a filename) starting with a hyphen ('-'). Please note that the first occurrence of this string given as argument will not be supplied as CliArgument but only parsed internally to hide complexity for the developer using this API.
      See Also:
  • Constructor Details

    • CliArgument

      protected CliArgument(String arg)
      The constructor.
      Parameters:
      arg - the argument.
  • Method Details