rvesse / airline

Java annotation-based framework for parsing Git like command line structures with deep extensibility
https://rvesse.github.io/airline/
Apache License 2.0
128 stars 20 forks source link

Support specifying global restrictions by annotation #37

Closed rvesse closed 8 years ago

rvesse commented 8 years ago

Currently global restrictions can only be specified either via the @Cli annotation where they are referenced by class or via CliBuilder where they are passed as instances.

It would be nice if these could also be specified by providing annotations on your @Cli annotated class

This will require adding a GlobalRestrictionFactory and using ServiceLoader to auto-detect them in RestrictionRegistry. The MetadataLoader will also need to look for global restrictions when loading the meta-data for @Cli annotated classes.