Changeset 10209 in josm for trunk/src/gnu/getopt/LongOpt.java
- Timestamp:
- 2016-05-14T14:41:18+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gnu/getopt/LongOpt.java
r5279 r10209 5 5 /* 6 6 /* This program is free software; you can redistribute it and/or modify 7 /* it under the terms of the GNU Library General Public License as published 7 /* it under the terms of the GNU Library General Public License as published 8 8 /* by the Free Software Foundation; either version 2 of the License or 9 9 /* (at your option) any later version. … … 15 15 /* 16 16 /* You should have received a copy of the GNU Library General Public License 17 /* along with this program; see the file COPYING.LIB. If not, write to 18 /* the Free Software Foundation Inc., 59 Temple Place - Suite 330, 17 /* along with this program; see the file COPYING.LIB. If not, write to 18 /* the Free Software Foundation Inc., 59 Temple Place - Suite 330, 19 19 /* Boston, MA 02111-1307 USA 20 20 /**************************************************************************/ … … 22 22 package gnu.getopt; 23 23 24 import java.util.Locale;25 import java.util.ResourceBundle;26 24 import java.text.MessageFormat; 27 25 … … 34 32 * session. Refer to the getopt documentation for details on the 35 33 * format of long options. 36 * 34 * 37 35 * @version 1.0.5 38 36 * @author Aaron M. Renn (arenn@urbanophile.com) … … 55 53 public static final int NO_ARGUMENT = 0; 56 54 57 /** 55 /** 58 56 * Constant value used for the "has_arg" constructor argument. This 59 57 * value indicates that the option takes an argument that is required. … … 116 114 * @param flag If non-null, this is a location to store the value of "val" when this option is encountered, otherwise "val" is treated as the equivalent short option character. 117 115 * @param val The value to return for this long option, or the equivalent single letter option to emulate if flag is null. 118 * 116 * 119 117 * @exception IllegalArgumentException If the has_arg param is not one of NO_ARGUMENT, REQUIRED_ARGUMENT or OPTIONAL_ARGUMENT. 120 118 */ 121 119 public 122 LongOpt(String name, int has_arg, 120 LongOpt(String name, int has_arg, 123 121 StringBuffer flag, int val) throws IllegalArgumentException 124 122 { 125 123 // Validate has_arg 126 if ((has_arg != NO_ARGUMENT) && (has_arg != REQUIRED_ARGUMENT) 124 if ((has_arg != NO_ARGUMENT) && (has_arg != REQUIRED_ARGUMENT) 127 125 && (has_arg != OPTIONAL_ARGUMENT)) 128 126 { 129 Object[] msgArgs = { new Integer(has_arg).toString() };127 Object[] msgArgs = { Integer.toString(has_arg) }; 130 128 throw new IllegalArgumentException(MessageFormat.format( 131 129 _messages.getString("getopt.invalidValue"), msgArgs));
Note:
See TracChangeset
for help on using the changeset viewer.