Open pvlasov opened 4 months ago
Okay, we can do this.
Can we call the interface IAnnotatedElementProvider
?
Great! I've renamed IReflector
to IAnnotatedElementProvider
: https://github.com/remkop/picocli/compare/main...Nasdanika:picocli:main.
Please let me know if you need anything else!
Can you provide a pull request with tests please?
I've created a pull request - https://github.com/remkop/picocli/pull/2328. It builds successfully in my local environment, the merge request status is "Review required".
Nasdanika CLI operates on top of Picocli. One of its features is generation of HTML documentation site and support of extended documentation. Sample site without extended documentation.
Currently this functionality works with CommandSpec by accessing user object. To extend it to ArgSpec/OptionSpec it is necessary to be able to access underlying fields/methods.
This commit introduces IReflector interface which provides access to AnnotatedElement (Method/Field). This interface is implemented by FieldBinding and Method Binding.
I hope that this modification is in alignment with the Picocli philosophy and will be accepted! Please let me know whether any further action is required from me, e.g. creation of a pull request!