You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(WON'T FIX) Remove the @Command(addMethodSubcommands) attribute and add method commands automatically as subcommands if (and only if) the class has a @Command annotation. I changed my mind on this; it is useful to be able to switch this off if needed.
(WON'T FIX) Make the CommandLine#addMethodSubcommands and getCommandMethods methods private to reduce the public API surface. I removed addMethodSubcommands (it wasn't used), but changed my mind on the getCommandMethods method and keeping it.
Don't mix in options/positional params from the containing class @Command into the method commands.
Command methods should be able to mix in the standard help options.
Bugfix: unannotated method parameters should be assigned a positional index matching their parameter index (but skipping @Option method parameters)
New feature: if compiled with the -parameters flag on Java 8 or higher, the method parameter name should be obtained with java.lang.reflect.Parameter#getName using reflection instead of the generic arg0, arg1, etc.
Add documentation for @Command methods. Ideally add a recommendation on when to use which annotation style. (Location could be after 15.1 Annotated Methods or perhaps a separate page.)
The text was updated successfully, but these errors were encountered:
* improved javadoc
* getCommandMethods now returns a List instead of a Map
* Bugfix: unannotated method parameters should be assigned a positional index matching their parameter index (but skipping @option method parameters)
* New feature: if compiled with the -parameters flag on Java 8 or higher, the method parameter name should be obtained with java.lang.reflect.Parameter#getName using reflection instead of the generic arg0, arg1, etc.
Some todos remain from PR #416:
@Command(addMethodSubcommands)
attribute and add method commands automatically as subcommands if (and only if) the class has a@Command
annotation. I changed my mind on this; it is useful to be able to switch this off if needed.CommandLine#addMethodSubcommands
andgetCommandMethods
methods private to reduce the public API surface. I removedaddMethodSubcommands
(it wasn't used), but changed my mind on thegetCommandMethods
method and keeping it.@Command
into the method commands.@Option
method parameters)-parameters
flag on Java 8 or higher, the method parameter name should be obtained withjava.lang.reflect.Parameter#getName
using reflection instead of the genericarg0
,arg1
, etc.@Command
methods. Ideally add a recommendation on when to use which annotation style. (Location could be after 15.1 Annotated Methods or perhaps a separate page.)The text was updated successfully, but these errors were encountered: