-
Notifications
You must be signed in to change notification settings - Fork 21
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
Support qualifiers with members #488
Conversation
Curious, it seems only JDK 11 has some weird issue that prevents this from working. |
This reverts commit 1888f86.
It seems that in JDK 11, the qualifier code generates differently, it'll wire, but the ability to use test mocking is impaired. |
the problem here seems to be that there's a discrepancy with how the annotation are rendered at runtime with |
I managed to get it working with regex, with the only limitation being that qualifiers with annotation members are only supported if the nested annotation type has only a single member. |
inject-test/src/test/java/org/example/injectextension/WithExtnNamedSpyTest.java
Outdated
Show resolved
Hide resolved
This reverts commit e08e45e.
Cool. So we probably should add a new test for the case where someone uses I'm also thinking there could be a test for the "simple case" where the qualifier only has 1 attribute? Like what was the motivation for this feature / I'm not expecting anyone to use nested attributes so |
ehh, I reverted it, we could always do it later |
Was looking at Weld and got inspired. In any case, it helps cut down on annotation overload so I thought it was a good idea. |
Can now use a qualifier's members to help distinguish beans:
So given:
this will generate