forked from airlift/airline
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Refactor how option restrictions are implemented #25
Comments
rvesse
added a commit
that referenced
this issue
Jul 23, 2015
- Define first draft interfaces - Start attempting basic implementations
rvesse
added a commit
that referenced
this issue
Jul 24, 2015
- Move annotations into own packages - Define factory classes - Add factory registry
rvesse
added a commit
that referenced
this issue
Jul 24, 2015
- Remove defunct fields from @option and @arguments - Add restrictions to metadata classes - Load restrictions in metadata loader
rvesse
added a commit
that referenced
this issue
Jul 27, 2015
Most existing code switched over to use the new restrictions framework and all existing tests passing Examples updated to use new annotations for declaring additional restrictions
rvesse
added a commit
that referenced
this issue
Jul 27, 2015
Switches over the CliParser and SingleCommandParser to support using GlobalRestriction to enforce global restrictions. Changed SingleCommand and CliBuilder to allow specifying custom restrictions as desired.
rvesse
added a commit
that referenced
this issue
Jul 27, 2015
- Various tests for @IntegerRange - Fix bug in error messages generated by RangeRestriction - Add tests for restriction inheritance behaviour
rvesse
added a commit
that referenced
this issue
Jul 27, 2015
Updates the Migration notes to reflect the various changes introduced by the new restrictions framework.
This is implemented but not yet merged into the 2.x branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently we support two kinds of option restrictions:
allowedValues
i.e. restricted set of valuesIdeally we'd like to support a wider range of restrictions e.g.
Rather than keep adding stuff to the
@Option
annotation it would be better to create a new@OptionRestriction
annotation (and sub-classes thereof) which would be used to annotate fields to indicate restrictions that apply. These could then be discovered via reflection and added to theOptionMetadata
for an option.The text was updated successfully, but these errors were encountered: