-
Notifications
You must be signed in to change notification settings - Fork 424
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
IAnnotatedElementProvider to Access to ArgSpec/OptionSpec setter/getter field/method #2328
base: main
Are you sure you want to change the base?
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR!
I put some comments. Can you take a look?
|
||
/** | ||
* Provides access to the underlying {@link AnnotatedElement}. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a @since 4.8.0
javadoc tag here please?
} | ||
|
||
@Test | ||
public void testFieldAccess() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a test for annotated method access?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All done!
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.