private void parse(String[] argList) throws HelpShownException {
        List<String> args = new LinkedList<>();
        args.addAll(List.of(argList));

        while (!args.isEmpty()) {
            String arg = args.remove(0);

            if (arg.equals("-h") || arg.equals("--help")) {
                help();
                throw new HelpShownException();
            } else if ("--abortondataerror".equals(arg)) {
                feederConfigBuilder.abortondocumenterror(getBoolean(getParam(args, arg)));
            } else if ("--abortonsenderror".equals(arg)) {
                feederConfigBuilder.abortonsenderror(getBoolean(getParam(args, arg)));
            } else if ("--file".equals(arg)) {
                files.add(getParam(args, arg));
            } else if ("--maxpending".equals(arg)) {
                feederConfigBuilder.maxpendingdocs(Integer.parseInt(getParam(args, arg)));
            } else if ("--mode".equals(arg)) {
                mode = getParam(args, arg);
            } else if ("--noretry".equals(arg)) {
                feederConfigBuilder.retryenabled(false);
            } else if ("--route".equals(arg)) {
                feederConfigBuilder.route(getParam(args, arg));
            } else if ("--timeout".equals(arg)) {
                feederConfigBuilder.timeout(Double.parseDouble(getParam(args, arg)));
            } else if ("--trace".equals(arg)) {
                feederConfigBuilder.tracelevel(Integer.parseInt(getParam(args, arg)));
            } else if ("--validate".equals(arg)) {
                validateOnly = true;
            } else if ("--dumpDocuments".equals(arg)) {
                dumpDocumentsFile = getParam(args, arg);
            } else if ("--maxfeedrate".equals(arg)) {
                feederConfigBuilder.maxfeedrate(Double.parseDouble(getParam(args, arg)));
            } else if ("--create-if-non-existent".equals(arg)) {
                feederConfigBuilder.createifnonexistent(true);
            } else if ("-v".equals(arg) || "--verbose".equals(arg)) {
                verbose = true;
            } else if ("--priority".equals(arg)) {
                priority = getParam(args, arg);
            } else if ("--numthreads".equals(arg)) {
                numThreads = Integer.parseInt(getParam(args, arg));
            } else {
                files.add(arg);
            }
        }

        propertyProcessor = new MessagePropertyProcessor(getFeederConfig());
    }
Argument parsing class for the vespa feeder.
vespaclient-java/src/main/java/com/yahoo/vespafeeder/Arguments.java