Code to locate methods on classes based on annotations currently mostly uses a combination of MethodIntrospector
and AnnotatedElementUtils
.
For example, in EventListenerMethodProcessor
:
https://github.com/spring-projects/spring-framework/blob/6266370a7aca5e03dc88dbaf95252bb13333dbcc/spring-context/src/main/java/org/springframework/context/event/EventListenerMethodProcessor.java#L148-L150
With the addition of the new MergedAnnotations
API along with the annotation index work it might be nicer if we had a first class way to find such methods.
One possible solution would be to add finder
methods to MergedAnnotation
.
For example:
MergedAnnotation.find(SomeAnnotation.class).onMethodsIn(SomeCandidate.class);
Comment From: andresetevejob
I do not know what I have to do, I link the exchanges and I wanted to know how to start to contribute to the code, should I read the source code how it goes. I have never participated in a opensource project, help me
Comment From: snicoll
@andresetevejob thanks for offering to help. Newcomers should watch flagged issues with "help wanted" or "ideal for contribution". This issue isn't one of those. In particular, please don't consider assigned issues for which work might have started leading to duplicate efforts.
The Spring Boot project has dedicated issues for newcomers, see the first timers only label. We have two opened at the moment and they're both assigned so please watch out that link for more.
Comment From: andresetevejob
Thanks you, Nicoll
Le jeu. 14 mars 2019 à 09:26, Stéphane Nicoll notifications@github.com a écrit :
@andresetevejob https://github.com/andresetevejob thanks for offering to help. Newcomers should watch flagged issues with "help wanted" or "ideal for contribution". This issue isn't one of those. In particular, please don't consider assigned issues for which work might have started leading to duplicate efforts.
The Spring Boot project has dedicated issues for newcomers, see [ https://github.com/spring-projects/spring-boot/labels/status%3A%20first-timers-only](the https://github.com/spring-projects/spring-boot/labels/status%3A%20first-timers-only%5D(the first timers only label). We have two opened at the moment and they're both assigned so please watch out that link for more.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-framework/issues/22569#issuecomment-472749266, or mute the thread https://github.com/notifications/unsubscribe-auth/ADL-9OjiCla5aGeyPJS_Tg53trwtzcsZks5vWgesgaJpZM4bpvWc .
Comment From: sbrannen
Team Decision: features like MethodIntrospector
and MergedAnnotations
are orthogonal concerns and should therefore not be combined in a common API/implementation.