Interface CLOption.CLODelegate

Enclosing class:
CLOption

public static interface CLOption.CLODelegate
Interface to process command line arguments
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    If settings for option are not known upon initialization, an up-to-date description is requested when needed (e.g.
    default int
    Optional: position of key in the list of arguments.
    boolean
    Parse string arg and set configurable parameters that correspond to this command line option.
  • Method Details

    • parse

      boolean parse(String arg)
      Parse string arg and set configurable parameters that correspond to this command line option.

      Note: returning false triggers a warning about which command line option failed to correctly parse. If the parser can rectify the issue on the spot this is also acceptable. In that case the method should return true and possibly log the fact that parameters have been adjusted.

      Parameters:
      arg - the argument for parsing by command line option
      Returns:
      true if parsing successful
    • getDescription

      default String getDescription()
      If settings for option are not known upon initialization, an up-to-date description is requested when needed (e.g. if help is requested, typically using --help options).
      Returns:
      description of command line option.
    • getKeyPos

      default int getKeyPos()
      Optional: position of key in the list of arguments. Used in help display.
      Returns:
      the position of the key