Oliver Drotbohm opened SPR-16100 and commented
ClassMetadata
currently exposes ASM based metadata about the type hierarchy. Also, it's subtype AnnotationMetadata
exposes information about type annotations and annotated methods.
It would be very helpful to also be able to obtain the MethodMetadata
for all declared methods in a type.
Affects: 4.3.12, 5.0 GA
Issue Links: - DATAJPA-1209 Compatibility with Hibernate < 5.2.11 broken for projections on native queries - DATACMNS-1206 Introduce abstraction to detect declared methods in declaration order
Comment From: spring-projects-issues
Juergen Hoeller commented
This turns out to be somewhat involved since our ASM visitors currently only store annotated methods. With the ASM visitor model, you have to know upfront what you intend to retrieve, so we might be better off providing a dedicated lookup method here - outside of MetadataReader
. I'll revisit this for 5.0.2 / 4.3.13.
Comment From: spring-projects-issues
Juergen Hoeller commented
Folding this into the MetadataReader
model is indeed not an option since it conflicts with other purposes, in particular classpath scanning, and I don't want to make compromises there - neither at the API level nor in terms of runtime metadata storage.
We could offer a separate utility with custom use of ASM along the lines of LocalVariableTableParameterNameDiscoverer
. Since this requires some internal caching for an efficient solution and since we don't have a use case for it in the core framework, I'd rather put a tailored utility for your purposes into Spring Data Commons instead. We may revisit this once further use cases appear.