(format.isParameter() ? "parameter " : "option ")+ format.getOption()+ ((format.getParameters().length > 1) ? " part "+type.getName() : "")+
(format.isParameter() ? "parameter " : "option ") + format.getOption() + ((format.getParameters().length > 1) ? " part " + type.getName() : "") +
(format.isParameter() ? "parameter " : "option ")+ format.getOption()+ ((format.getParameters().length > 1) ? " part "+type.getName() : "")+
List<Object> values = parseValues(args, i + (1 - diff), format); i += Math.max(values.size() - diff, 0); if (format.isVariableLength() && options.containsKey(format.getOption())) { options.get(format.getOption()).addAll(values); } else { addValues2Option(format.getOption(), values, options); addValues2Option(format.getOption(), null, options); addValues2Option(af.getOption(), defaults, options); if (of.isMandatory() && !options.containsKey(of.getOption())) { List<Object> defaults = new ArrayList<>(); if (of.getParameters() != null) { throw new ArgumentParseException(-1, null, of, ((of.getParameters() != null && of.getParameters().length > 0) ? of.getParameters()[0] : null)); } else { addValues2Option(of.getOption(), defaults, options);
i += Math.max(values.size() - diff, 0); if (format.isVariableLength() && options.containsKey(format.getOption())) { List extValues = options.get(format.getOption()); extValues.addAll(values); addValues2Option(format.getOption(), values, options); addValues2Option(format.getOption(), null, options); addValues2Option(af.getOption(), defaults, options); if (of.isMandatory() && !options.containsKey(of.getOption())) { List defaults = new ArrayList(); if (of.getParameters() != null) { throw new ArgumentParseException(-1, null, of, ((of.getParameters() != null && of.getParameters().length > 0) ? of.getParameters()[0] : null)); } else { addValues2Option(of.getOption(), defaults, options);
i += Math.max(values.size() - diff, 0); if (format.isVariableLength() && options.containsKey(format.getOption())) { List extValues = (List)options.get(format.getOption()); extValues.addAll(values); addValues2Option(format.getOption(), values, options); addValues2Option(format.getOption(), null, options); if (of.isMandatory() && !options.containsKey(of.getOption())) { List defaults = new ArrayList(); for (int i=0; i<of.getParameters().length; i++) { addValues2Option(of.getOption(), defaults, options);
public ArgumentParseException(int position, String value, ArgumentFormat parameterFormat, ArgumentParameter parameterFormatDetail) { super((value != null) ? "Invalid value '" + value + "' at position " + position : "Mandatory parameter " + ((parameterFormat == null) ? "<unknown>" : parameterFormat.getOption()) + "(" + ((parameterFormatDetail == null) ? "<unknown>" : parameterFormatDetail.getName()) + ") not specified", position); this.parameterFormat = parameterFormat; this.parameterFormatDetail = parameterFormatDetail; this.value = value; }
public ArgumentParseException(int position, String value, ArgumentFormat parameterFormat, ArgumentParameter parameterFormatDetail) { super((value != null) ? "Invalid value '"+value+"' at position "+position : "Mandatory parameter "+((parameterFormat == null) ? "<unknown>" : parameterFormat.getOption())+"("+ ((parameterFormatDetail == null) ? "<unknown>" : parameterFormatDetail.getName())+") not specified", position); this.parameterFormat = parameterFormat; this.parameterFormatDetail = parameterFormatDetail; this.value = value; }
public ArgumentParseException(int position, String value, ArgumentFormat parameterFormat, ArgumentParameter parameterFormatDetail) { super((value != null) ? "Invalid value '"+value+"' at position "+position : "Mandatory parameter "+parameterFormat.getOption()+"("+ parameterFormatDetail.getName()+") not specified", position); this.parameterFormat = parameterFormat; this.parameterFormatDetail = parameterFormatDetail; this.value = value; }