public static void checkInvalidArgs(OptionParser parser,
                                        OptionSet options,
                                        OptionSpec<?> usedOption,
                                        Set<OptionSpec<?>> invalidOptions) {
        OptionSpec<?>[] array = new OptionSpec<?>[invalidOptions.size()];
        invalidOptions.toArray(array);
        checkInvalidArgs(parser, options, usedOption, array);
    }
Check that none of the listed options are present.
server-common/src/main/java/org/apache/kafka/server/util/CommandLineUtils.java