docs: public Arguments processArgs(final String[] arguments) {
          useColor = getUseColor();
  
          final Map<String, Object> definedProps = new HashMap<>();
          final Deque<String> args = new ArrayDeque<>(Arrays.asList(arguments));
          while (!args.isEmpty()) {
              final String arg = args.pop();
  
              if (isLongForm(arg, "-help") || arg.equals("-h")) {
                  justPrintUsage = true;
              } else if (isLongForm(arg, "-version")) {
                  justPrintVersion = true;
              } else if (isLongForm(arg, "-plugins")) {
                  justPrintPlugins = true;
              } else if (isLongForm(arg, "-transtypes")) {
                  justPrintTranstypes = true;
              } else if (isLongForm(arg, "-deliverables")) {
                  justPrintDeliverables = true;
              } else if (isLongForm(arg, "-install")) {
                  handleArgInstall(arg, args);
              } else if (isLongForm(arg, "-project") || arg.equals("-p")) {
                  handleArgProject(arg, args);
              } else if (isLongForm(arg, "-force")) {
                  definedProps.put("force", "true");
              } else if (isLongForm(arg, "-uninstall")) {
                  handleArgUninstall(arg, args);
              } else if (isLongForm(arg, "-diagnostics")) {
                  justPrintDiagnostics = true;
              } else if (isLongForm(arg, "-verbose") || arg.equals("-v")) {
                  msgOutputLevel = Project.MSG_INFO;
              } else if (isLongForm(arg, "-debug") || arg.equals("-d")) {
                  msgOutputLevel = Project.MSG_VERBOSE;
              } else if (isLongForm(arg, "-noinput")) {
                  allowInput = false;
              } else if (isLongForm(arg, "-logfile") || arg.equals("-l")) {
                  handleArgLogFile(arg, args);
              } else if (isLongForm(arg, "-buildfile") || isLongForm(arg, "-file")) { //|| arg.equals("-f")
                  handleArgBuildFile(args);
              } else if (isLongForm(arg, "-listener")) {
                  handleArgListener(args);
              } else if (arg.startsWith("-D")) {
                  handleArgDefine(arg, args);
              } else if (isLongForm(arg, "-logger")) {
                  handleArgLogger(args);
              } else if (isLongForm(arg, "-inputhandler")) {
                  handleArgInputHandler(args);
              } else if (isLongForm(arg, "-emacs") || arg.equals("-e")) {
                  emacsMode = true;
              } else if (isLongForm(arg, "-propertyfile")) {
                  handleArgPropertyFile(arg, args);
              } else if (arg.equals("-k") || isLongForm(arg, "-keep-going")) {
                  keepGoingMode = true;
              } else if (isLongForm(arg, "-nice")) {
                  handleArgNice(args);
              } else if (isLongForm(arg, "-input") || arg.equals("-i")) {
                  handleArgInput(arg, args, ARGUMENTS.get(getArgumentName(arg)));
              } else if (ARGUMENTS.containsKey(getArgumentName(arg))) {
                  definedProps.putAll(handleParameterArg(arg, args, ARGUMENTS.get(getArgumentName(arg))));
              } else if (getPluginArguments().containsKey(getArgumentName(arg))) {
                  definedProps.putAll(handleParameterArg(arg, args, getPluginArguments().get(getArgumentName(arg))));
              } else if (LAUNCH_COMMANDS.contains(arg)) {
                  // catch script/ant mismatch with a meaningful message
                  // we could ignore it, but there are likely to be other
                  // version problems, so we stamp down on the configuration now
                  final String msg = "Ant's Main method is being handed " + "an option " + arg
                          + " that is only for the launcher class."
                          + "\nThis can be caused by a version mismatch between "
                          + "the ant script/.bat file and Ant itself.";
                  throw new BuildException(msg);
              } else if (isLongForm(arg, "-autoproxy")) {
                  proxy = true;
              } else if (arg.startsWith("-") || arg.startsWith("/")) {
                  // we don't have any more args to recognize!
                  throw new IllegalArgumentException(arg);
              } else {
                  // if it's no other arg, it may be the target
                  targets.addElement(arg);
              }
          }
          if (!inputs.isEmpty()) {
              definedProps.put("args.input", inputs.get(0));
          }
  
          if (install && msgOutputLevel < Project.MSG_INFO) {
              emacsMode = true;
          }
  
          definedProps.putAll(loadPropertyFiles());
  
          return new Arguments(useColor, msgOutputLevel, buildFile, install, installFile, projectFile, uninstallId,
                  inputs, targets, listeners, propertyFiles, allowInput, keepGoingMode, loggerClassname,
                  inputHandlerClassname, emacsMode, threadPriority, proxy, justPrintUsage, justPrintVersion,
                  justPrintDiagnostics, justPrintPlugins, justPrintTranstypes, justPrintDeliverables, logFile,
                  definedProps);
      }