/** * Create an Option using the current settings * * @return the Option instance * @throws IllegalArgumentException if <code>longOpt</code> has not been set. */ public static Option create() throws IllegalArgumentException { if (longopt == null) { OptionBuilder.reset(); throw new IllegalArgumentException("must specify longopt"); } return create(null); }
OptionBuilder.reset();
/** * Create an Option using the current settings * * @return the Option instance * @throws IllegalArgumentException if <code>longOpt</code> has not been set. */ public static Option create() throws IllegalArgumentException { if (longopt == null) { OptionBuilder.reset(); throw new IllegalArgumentException("must specify longopt"); } return create(null); }
/** * Create an Option using the current settings * * @return the Option instance * @throws IllegalArgumentException if <code>longOpt</code> has not been set. */ public static Option create() throws IllegalArgumentException { if (longopt == null) { OptionBuilder.reset(); throw new IllegalArgumentException("must specify longopt"); } return create(null); }
/** * Create an Option using the current settings * * @return the Option instance * @throws IllegalArgumentException if <code>longOpt</code> has not been set. */ public static Option create() throws IllegalArgumentException { if (longopt == null) { OptionBuilder.reset(); throw new IllegalArgumentException("must specify longopt"); } return create(null); }
/** * Create an Option using the current settings and with * the specified Option <code>char</code>. * * @param opt the <code>java.lang.String</code> representation * of the Option * @return the Option instance * @throws IllegalArgumentException if <code>opt</code> is not * a valid character. See Option. */ public static Option create(String opt) throws IllegalArgumentException { // create the option Option option = new Option(opt, description); // set the option properties option.setLongOpt(longopt); option.setRequired(required); option.setOptionalArg(optionalArg); option.setArgs(numberOfArgs); option.setType(type); option.setValueSeparator(valuesep); option.setArgName(argName); // reset the OptionBuilder properties OptionBuilder.reset(); // return the Option instance return option; } }
/** * Create an Option using the current settings and with * the specified Option <code>char</code>. * * @param opt the <code>java.lang.String</code> representation * of the Option * @return the Option instance * @throws IllegalArgumentException if <code>opt</code> is not * a valid character. See Option. */ public static Option create(String opt) throws IllegalArgumentException { // create the option Option option = new Option(opt, description); // set the option properties option.setLongOpt(longopt); option.setRequired(required); option.setOptionalArg(optionalArg); option.setArgs(numberOfArgs); option.setType(type); option.setValueSeparator(valuesep); option.setArgName(argName); // reset the OptionBuilder properties OptionBuilder.reset(); // return the Option instance return option; } }
} finally { OptionBuilder.reset();
} finally { OptionBuilder.reset();
OptionBuilder.reset();