IAnnotatedElementProvider to Access to ArgSpec/OptionSpec setter/getter field/method#2328
IAnnotatedElementProvider to Access to ArgSpec/OptionSpec setter/getter field/method#2328pvlasov wants to merge 13 commits intoremkop:mainfrom
Conversation
Nasdanika CLI operates on top of picocli. One of its features is generation of HTML documentation site and support of extended documentation (https://docs.nasdanika.org/core/cli/index.html#extended-documentation) Currently this functionality works with CommandSpec by accessing user object. To extend it to arguments and options it is necessary to be able to access underlying fields/methods. This commit introduces IReflector interface implemented by FieldBinding and Method Binding.
remkop
left a comment
There was a problem hiding this comment.
Thank you for the PR!
I put some comments. Can you take a look?
|
Hello, I've synced the fork and ran a local build - it was successful on Java 17, Windows 11. Please let me know if there is anything else I need to do. |
|
I changed the My tests now pass on both Java 8 and Java 17, but the build (clean build) fails on groovy test (see below). However, I cloned the main branch and its build also fails with the same message. So I think it is either my setup or something in the code which I did not touch. Error message: |
|
Hello, I've fixed the failing groovy test - please verify that the fix is OK. Builds are successful on Windows 11 with Java 8 and 17 and on Debian Linux with Java 17. As I mentioned in my previous comment, the main branch build was also failing on the same groovy test in my environment. This change fixes the main branch build too. As a side note, here is an example of this new functionality in action - generation of option and parameter documentation from annotated fields and methods: Sharing it in case it might be of interest for the picocli community. More detailed documentation will be published soon. For those who might need this functionality sooner than the official release there are two options. Use Nasdanika snapshots repositoryAdd <repositories>
<repository>
<id>nasdanika-snapshots</id>
<url>https://maven.nasdanika.org/snapshots</url>
</repository>
</repositories> to your Build locally
|
It is needed to get annotations on method parameter options and positional parameters.
This pull request introduces IAnnotatedElementProvider interface implemented by FieldBinding and MethodBinding.
This allows to access underlying fields/methods of parameters and options.
See also issue #2325.