JOpt Simple version 2.4.1
Changes in version 2.4.1
Changes in version 2.4
- Adding the
acceptsAll method to class
OptionParser. Options passed to a given invocation of this
method are treated as synonymous, so that each gives the same answer
when given as the argument to the methods has,
valuesOf, etc. on OptionSet.
- Surfacing the class
KeyValuePair. This class can be very
handy as a value type for arguments whose values take on the form
key=value, such as the -D arguments to JVMs.
- Fixed
bug
1932577.
- Added method
withValuesSeparatedBy to class
ArgumentAcceptingOptionSpec, to allow callers to specify
multiple values for an option as a single argument with values separated
by a given character.
- Method
ofType on class
ArgumentAcceptingOptionSpec now returns self rather than
void.
- Deprecated another "gets for gets' sake":
OptionParser.setPosixlyCorrect(). It is replaced with a
less Java-beany-looking method.
- Cleaned up the help screens output by
OptionParser.printHelpOn so they are rendered as two
40-character columns, with long space-broken values split across lines
as needed.
- Fixed
bug
1956418.
Changes in version 2.3.6
- No changes to code; just getting Maven
to do releases with its plugins.
Changes in version 2.3.3
- Deprecated method
OptionSet.wasDetected in favor of
OptionSet.has -- the new name seems to read better.
OptionExceptions now override getMessage
sensibly, so that if caller wants to handle the exception by catching it
and displaying a message from the exception, they can do so and get
satisfactory results.
- Maven-izing project's build.
- Minor internal changes.
Changes in version 2.3.2
Changes in version 2.3.1
- Fixed a bug with POSIX-ly correct parsers. It was previously
thought that POSIX-ly correct parsers should signal end of options
when they detect an argument that does not lexically look like an option
and could not be an argument of a previous option, required or optional.
Such parsers now signal end of options when they detect an argument that
does not lexically look like an option, and is not an argument of a
previous option with a required argument. If you want such an
argument to be treated as the argument of a preceding option whose
argument is optional, you can still get this behavior by appending the
argument to the option, either with abutting syntax (
-d/tmp)
or key-value syntax (-d=/tmp).
Changes in version 2.3
- No feature changes in this release; but this release can now be
used with JDK 1.3. Previous release could be used only with JDK 1.4
or newer.
Changes in version 2.2
- Removed all previously deprecated methods.
- Re-clarified the contract of the one-arg
String
constructor of OptionParser: the constructor now raises
NullPointerException if its argument is
null. This is the convention for Java library methods
which receive illegal null parameters.
Changes in version 2.1
- Introduces a facility for
OptionParsers to print
a help screen, which describes the options they accept.
- Adds the ability to provide descriptions of options and their
arguments when configuring an
OptionParser.
These descriptions are printed in the aforementioned help screens.
- Clarified the contract of the one-arg
String constructor
of OptionParser: the constructor raises
IllegalArgumentException if its argument is
null.
- Deprecated
OptionParser.noArg,
OptionParser.requiredArg, and
OptionParser.optionalArg.
- Deprecated some "gets for gets' sake":
OptionException.getOption(),
OptionSet.getNonOptionArguments(). They are replaced with
less Java-beany-looking methods.
Changes in version 2.0
- Introduces a "domain-specific language" API for specifying options for
an option parser to recognize. The old methods for option specification
still work--you need not convert to the new methods.
- Adds the ability to specify that option arguments should be converted
to specific types. You can do this either with the old option
specification methods or with the new domain-specific language API.
- Deprecated
OptionParser.requiresArg in favor of
OptionParser.requiredArg -- the new name seems to read
better.
Version 1.0
- First major release.
- Includes concrete classes
OptionParser and
OptionSet.
- Supports POSIX
getopt() and GNU
getopt_long() command line syntax.
- No type conversion on option arguments, they are all treated as
Strings.
- Methods
noArg, requiredArg, and
optionalArg tell an option parser what options to
recognize.