code: public static CliArguments parse(String[] args) {
          CliArguments arguments = new CliArguments();
          if (args != null) {
              CmdLineParser parser = new CmdLineParser(arguments);
              try {
                  parser.parseArgument(args);
              } catch (CmdLineException e) {
                  // ignore
              }
  
              arguments.usageMode = false;
              for (String arg : args) {
                  for (int i = 0; i < USAGE_TOKENS.length; i++) {
                      String usageToken = USAGE_TOKENS[i];
                      if (usageToken.equalsIgnoreCase(arg)) {
                          arguments.usageMode = true;
                          break;
                      }
                  }
              }
          }
          return arguments;
      }
docs: Parses the CLI arguments and creates a CliArguments instance
  
  @param args
  the arguments as a string array
  @return
  @throws CmdLineException