private String getOptionWithArgument(String option, StringArrayEnumeration sae) { if (sae.hasMoreElements()) { String value = sae.nextElement(); if (value.startsWith("-")) { throw new JApiCmpException(JApiCmpException.Reason.CliError, String.format("Missing argument for option '%s'.", option)); } return value; } else { throw new JApiCmpException(JApiCmpException.Reason.CliError, String.format("Missing argument for option '%s'.", option)); } }
private String getOptionWithArgument(String option, StringArrayEnumeration sae) { if (sae.hasMoreElements()) { String value = sae.nextElement(); if (value.startsWith("-")) { throw new JApiCmpException(JApiCmpException.Reason.CliError, String.format("Missing argument for option '%s'.", option)); } return value; } else { throw new JApiCmpException(JApiCmpException.Reason.CliError, String.format("Missing argument for option '%s'.", option)); } }
StringArrayEnumeration sae = new StringArrayEnumeration(args); while (sae.hasMoreElements()) { String arg = sae.nextElement(); if ("--include-exclusively".equals(arg)) { includeExclusively = true; String arg = sae.nextElement(); if ("--include-exclusively".equals(arg) || "--exclude-exclusively".equals(arg)){ String nextElement = sae.inspectNextElement(); if (!nextElement.startsWith("-")) { nextElement = sae.nextElement(); options.addIgnoreMissingClassRegularExpression(nextElement);
StringArrayEnumeration sae = new StringArrayEnumeration(args); while (sae.hasMoreElements()) { String arg = sae.nextElement(); if ("--include-exclusively".equals(arg)) { includeExclusively = true; String arg = sae.nextElement(); if ("--include-exclusively".equals(arg) || "--exclude-exclusively".equals(arg)){ String nextElement = sae.inspectNextElement(); if (!nextElement.startsWith("-")) { nextElement = sae.nextElement(); options.addIgnoreMissingClassRegularExpression(nextElement);