anchor.diff:  
   image:https://picocli.info/images/declare.jpg[width=200]
   
  -With picocli, all information is in one place. With Commons CLI, you build a specification by calling a method with String values. One drawback of an API like this is that good style compels client code to define constants to avoid "magic values", like the Checkstyle `Main` class dutifully does. Annotations only accept String literals, so definition and usage are automatically placed together without the need to declare constants. This results in cleaner and less code.
  +With Commons CLI, you build a specification by calling a method with String values. One drawback of an API like this is that good style compels client code to define constants to avoid "magic values", like the Checkstyle `Main` class dutifully does.
  +
  +With picocli, all information is in one place. Annotations only accept String literals, so definition and usage are automatically placed together without the need to declare constants. This results in cleaner and less code.
   
   ===== Strongly Typed
   
   image::https://picocli.info/images/Type.jpg[width=200]
   
  -Commons CLI uses a boolean flag to denote whether the option takes an argument or not. Picocli lets you use types directly. Based on the type, picocli "knows" how many arguments the option needs: `boolean` fields don't have an argument, `Collection`, `Map` and array fields can have zero to any number of arguments, and any other type means the options takes a single argument. This can be customized (see https://picocli.info/#_arity[`arity`]) but most of the time the default is good enough.
  -
  -You can use `enum` types for options or positional parameters with a limited set of valid values. Not only will picocli validate the input for you, you can also https://picocli.info/#_show_default_values[show all values] in the usage help message with `@Option(description = "Option x. Valid values: ${COMPLETION-CANDIDATES}")`.
  +Commons CLI uses a boolean flag to denote whether the option takes an argument or not.
  +
  +Picocli lets you use types directly. Based on the type, picocli "knows" how many arguments the option needs: `boolean` fields don't have an argument, `Collection`, `Map` and array fields can have zero to any number of arguments, and any other type means the options takes a single argument. This can be customized (see https://picocli.info/#_arity[`arity`]) but most of the time the default is good enough.
  +
  +Picocli encourages you to use `enum` types for options or positional parameters with a limited set of valid values. Not only will picocli validate the input for you, you can also https://picocli.info/#_show_default_values[show all values] in the usage help message with `@Option(description = "Option x. Valid values: ${COMPLETION-CANDIDATES}")`.
   
   ===== Less Code
   
  
positive.code: try {
      CommandLine commandLine = new DefaultParser().parse(buildOptions(), args);
  
      // show version and exit if it is requested
      if (commandLine.hasOption(OPTION_VERSION)) {
          System.out.println("Checkstyle version: " + version());
          exitStatus = 0;
      } else if (commandLine.hasOption(OPTION_HELP)) {
          printUsage(System.out);
          exitStatus = 0;
      } else {
          exitStatus = runBusinessLogic();
      }
  } catch (ParseException pex) {
      exitStatus = EXIT_WITH_CLI_VIOLATION;
      System.err.println(pex.getMessage());
      printUsage(System.err);
  } catch (CheckstyleException ex) {
      exitStatus = EXIT_WITH_CHECKSTYLE_EXCEPTION_CODE;
      ex.printStackTrace();
  }
  
negative.code: 
  Picocli https://picocli.info/#_strongly_typed_everything[converts] the option parameter String value to the field type. Not only does it save the application from doing this work, it also provides some minimal validation on the user input. If the conversion fails, a `ParameterException` is thrown with a user-friendly error message.
  
  Let's look at an example to see how useful this is.  The Checkstyle `Main` class defines a `-x`, `--exclude-regexp` option that allows uses to specify a number of regular expressions for directories to exclude.
  
  With Commons CLI, you need to convert the String values to `java.util.regex.Pattern` objects in the application:
  [source,java]
  ----
  private static List<Pattern> getExclusions(CommandLine commandLine) {
  