jcommander icon indicating copy to clipboard operation
jcommander copied to clipboard

@Param(default = )

Open mkarg opened this issue 6 years ago • 1 comments

When using complex parameter types, often the defaults printed by usage() are unreadable. For example, the class of the parameter does not overwrite toString() so it prints just a hash code. Often these classes are final so the application programmer cannot fix this. In other cases, the application programmer might like to replace the simple telling of the default by a more elaborate wording, e. g. Default: platform dependent standard value.

In these cases the application programmer needs to be able to override JCommander's default behavior.

The most intuitive solution would be @Parameter(default = "platform dependent standard value").

mkarg avatar Jun 14 '19 11:06 mkarg

I would like to try on this.

fsd654qyl avatar May 16 '21 08:05 fsd654qyl