-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Consider renaming MergedAnnotation.getParent() #22946
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
Comments
...
I guess it depends on what you consider the starting point. Given the following: @interface Transactional
@Transactional
@interface MyTransactional
@MyTransactional
@ContextConfiguration
@RepositoryTests
@Transactional
@Service
@interface TransactionalService A logical top-down view would look like this:
You could say that That's why I've found it easier flip things on their head. If you imaging picking that tree up by the declared
If you picked it up by the
I then find in this scenario it's easier to think of the parent/child relationships as switched. The context of the annotation is especially important. If you image this class: @RepositoryTests
@TransactionalService
static class MyClass {
} We've actually got two different I do remember considering some other method names when I was originally designing the new API. I was thinking |
Thanks for making the changes in e386e53! 👍 |
Consider renaming
MergedAnnotation.getParent()
in order to avoid confusion regarding the top-down hierarchical nature of annotation declarations and reversed parent/child relationships.See discussions in #22818.
The text was updated successfully, but these errors were encountered: