@SuppressWarnings("AccessStaticViaInstance")
    private static Options createOptions() {
        Options options = new Options();

        options.addOption(Option.builder("h")
                .hasArg(false)
                .desc("Show this syntax page.")
                .longOpt(HELP_OPTION)
                .build());

        options.addOption(Option.builder("d")
                .hasArg(false)
                .desc("Dump list of documents for all buckets matching the selection command.")
                .longOpt(DUMP_OPTION)
                .build());

        options.addOption(Option.builder("r")
                .hasArg(true)
                .desc("Route to send the messages to, usually the name of the storage cluster.")
                .argName("route")
                .longOpt(ROUTE_OPTION)
                .build());

        options.addOption(Option.builder("s")
                .hasArg(true)
                .desc("Stat buckets within the given bucket space. If not provided, '" + FixedBucketSpaces.defaultSpace() + "' is used.")
                .argName("space")
                .longOpt(BUCKET_SPACE_OPTION)
                .build());

        // A group of mutually exclusive options for user, group, bucket, gid and document.
        OptionGroup optionGroup = new OptionGroup();
        optionGroup.setRequired(false);

        optionGroup.addOption(Option.builder("u")
                .hasArg(true)
                .desc("Dump list of buckets that can contain the given user.")
                .argName("userid")
                .longOpt(USER_OPTION)
                .build());

        optionGroup.addOption(Option.builder("g")
                .hasArg(true)
                .desc("Dump list of buckets that can contain the given group.")
                .argName("groupid")
                .longOpt(GROUP_OPTION)
                .build());

        optionGroup.addOption(Option.builder("b")
                .hasArg(true)
                .desc("Dump list of buckets that are contained in the given bucket, or that contain it.")
                .argName("bucketid")
                .longOpt(BUCKET_OPTION)
                .build());

        optionGroup.addOption(Option.builder("l")
                .hasArg(true)
                .desc("Dump information about one specific document, as given by the GID (implies --dump).")
                .argName("globalid")
                .longOpt(GID_OPTION)
                .build());

        optionGroup.addOption(Option.builder("o")
                .hasArg(true)
                .desc("Dump information about one specific document (implies --dump).")
                .argName("docid")
                .longOpt(DOCUMENT_OPTION)
                .build());

        options.addOptionGroup(optionGroup);
        return options;
    }
Responsible for parsing the command line arguments and presenting the help page

@author bjorncs
vespaclient-java/src/main/java/com/yahoo/vespastat/CommandLineOptions.java