Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add positional @Parameter annotation #8

Closed
remkop opened this issue Feb 4, 2017 · 0 comments
Closed

Add positional @Parameter annotation #8

remkop opened this issue Feb 4, 2017 · 0 comments

Comments

@remkop
Copy link
Owner

remkop commented Feb 4, 2017

This allows positional parameters to be assigned to separate fields with separate types.
usage example: <program> "header text" file1 23 file2 43

class Args {
  @Parameter(position=0, helpText="header text")       String headerText;
  @Parameter(position=1, helpText="binary input file") File binaryInput;
  @Parameter(position=2, helpText="record length")     int recordLength;
  @Parameter(position=3, helpText="text output file")  File output;
  @Parameter(position=4, helpText="max output lines")  int maxLines;
  ...
}

Definition:

@Parameter {
  int position;
  boolean required;
  String helpText;
  boolean hidden;
}

(Introduce a "positional parameters in progress" field?)

@remkop remkop modified the milestone: 0.4.0 advanced option parsing Feb 6, 2017
@remkop remkop modified the milestones: 0.3.0 usage online help, 0.5.0 advanced option parsing Mar 5, 2017
@remkop remkop closed this as completed in 2805416 Mar 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant