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

Access to ArgSpec and OptionSpec setter/getter fields and methods #2325

Open
pvlasov opened this issue Jul 23, 2024 · 4 comments
Open

Access to ArgSpec and OptionSpec setter/getter fields and methods #2325

pvlasov opened this issue Jul 23, 2024 · 4 comments
Milestone

Comments

@pvlasov
Copy link

pvlasov commented Jul 23, 2024

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!

@remkop
Copy link
Owner

remkop commented Jul 26, 2024

Okay, we can do this.
Can we call the interface IAnnotatedElementProvider?

@pvlasov
Copy link
Author

pvlasov commented Jul 26, 2024

Great! I've renamed IReflector to IAnnotatedElementProvider: main...Nasdanika:picocli:main.

Please let me know if you need anything else!

@remkop
Copy link
Owner

remkop commented Jul 29, 2024

Can you provide a pull request with tests please?

@pvlasov
Copy link
Author

pvlasov commented Jul 29, 2024

I've created a pull request - #2328.
It builds successfully in my local environment, the merge request status is "Review required".

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

2 participants