public String nextOption() {
        if (index >= params.length) {
            // No more parameters left
            return null;
        }
        String param = params[index];
        if (!param.startsWith("-")) {
            // Not an option
            return null;
        }

        index++;
        lastOptionOriginalForm = param;
        lastOptionValue = null;
        if (param.startsWith("--")) {
            // FORMAT: --name value OR --name=value
            if ("--".equals(param)) {
                // End of options marker
                return null;
            }
            int valueDelimiterIndex = param.indexOf('=');
            if (valueDelimiterIndex != -1) {
                lastOptionValue = param.substring(valueDelimiterIndex + 1);
                lastOptionOriginalForm = param.substring(0, valueDelimiterIndex);
                return param.substring("--".length(), valueDelimiterIndex);
            } else {
                return param.substring("--".length());
            }
        } else {
            // FORMAT: -name value
            return param.substring("-".length());
        }
    }
Returns the name (without leading dashes) of the next option (starting with the very first
option) or {@code null} if there are no options left.
<p>
<p>The value of this option can be obtained via {@link #getRequiredValue(String)},
{@link #getRequiredIntValue(String)}, and {@link #getOptionalBooleanValue(boolean)}.
cli/src/main/java/com/mcxiaoke/packer/cli/Options.java