Download Latest Version argparse4j-0.5.0.jar (83.8 kB)
Email in envelope

Get an email when there's a new version of argparse4j

Home / argparse4j-0.4.3
Name Modified Size InfoDownloads / Week
Parent folder
argparse4j-0.4.3-sources.jar 2014-01-05 86.2 kB
README.rst 2014-01-05 3.9 kB
argparse4j-0.4.3-javadoc.jar 2014-01-05 363.6 kB
argparse4j-0.4.3.jar 2014-01-05 81.7 kB
Totals: 4 Items   535.4 kB 0

argparse4j 0.4.3

Release Note

This release fixes a bug that causes unexpected string formatting due to the localization using the default locale. Now we use null Locale object to avoid the localization.

Changes

  • Use null Locale for format method

argparse4j 0.4.2

Release Note

This release fixes several bugs related to help and usage output. Now HelpArgumentAction throws exception instead of quit a program. The generic get method was added to Namespace object.

Changes

  • ArgumentParserImpl: Only flush output in methods without PrintWriter parameter

  • Added generic get method to Namespace

    Contributed by jon-ruckwood

  • Changed HelpArgumentAction to throw exception rather than exit

    Contributed by Adam Parkin

  • Fixed bug where System.out got closed in printHelp

    Contributed by Adam Parkin

argparse4j 0.4.1

Release Note

This release changes error message when matching empty string for subcommand. It adds the method to verify that a file argument can be created.

Changes

  • Throw "invalid choice" error when matching empty string for subcommand

  • Added method to verify that a file argument can be created.

    Contributed by Juan Manuel Caicedo Carvajal

argparse4j 0.4.0

Release Note

This release fixes the bug that argument is processed twice with concatenated short options. The following new features were added: argument/sub-command abbreviations, usage text override, ${prog} substitution in version text, sub-command aliases and count() action. If neither title nor description are specified to MutuallyExclusiveGroup, the help message for the group is merged into other optinal arguments. The Argument.type(Class) now supports valueOf(String) static method for conversion. It also now supports enums directly. The behavior of nargs("*") for optional arguments are slightly changed for some corner-cases. See the changes for details.

Changes

  • Show command aliases in help message

  • Avoid \n and use %n or TextHelper.LINESEP instead

  • Add CountArgumentAction

    CountArgumentAction counts the number of occurrence of an option. Arguments.count() returns the instance of this object for shortcut.

  • Support ${prog} substitution in version string

  • Add ArgumentParser.usage()

    By default, the program usage is generated from the arguments the ArgumentParser object contains. This method overrides it.

  • Add ArgumentParser.addMutuallyExclusiveGroup() without title arg

    If both title and description are empty, the help message for the group is merged into other optional arguments.

  • Don't show available enum constants when conversion failed

    If they are shown, user may be confused with choices because choices may be more limited.

  • Add ReflectArgumentType

    ReflectArgumentType is an enhanced version of ConstructorArgumentType. It first tries to convert given String to desired type using valueOf static method of the type. If it failed, use the constructor of given type just like a ConstructorArgumentType. Since enums have valueOf static method, ReflectArgumentType works with enums as well. The ReflectArgumentType effectively deprecates ConstructorArgumentType and EnumArgumentType.

  • Throw exception if no nameOrFlags is given

  • Support argument/sub-command abbreviations

  • Adjust narg("*") handling for optinal arguments

    The optional argument with nargs("*") and without default set is not given in command-line, the result is now null instead of empty list.

    The optional argument with nargs("*") is given in command-line with emtpy list, the result is now empty list. It will overwrite existing value or appened to the existing list in case of append() action.

  • Fix bug that argument is processed twice with concatenated short options

Source: README.rst, updated 2014-01-05