Expose reflection metadata with ASM-driven method order
Issue: SPR-14505
This commit is contained in:
parent
fd41f63ec0
commit
0208198804
|
@ -364,7 +364,17 @@ class ConfigurationClassParser {
|
||||||
try {
|
try {
|
||||||
AnnotationMetadata asm =
|
AnnotationMetadata asm =
|
||||||
this.metadataReaderFactory.getMetadataReader(original.getClassName()).getAnnotationMetadata();
|
this.metadataReaderFactory.getMetadataReader(original.getClassName()).getAnnotationMetadata();
|
||||||
beanMethods = asm.getAnnotatedMethods(Bean.class.getName());
|
Set<MethodMetadata> asmMethods = asm.getAnnotatedMethods(Bean.class.getName());
|
||||||
|
Set<MethodMetadata> reflectionMethods = beanMethods;
|
||||||
|
beanMethods = new LinkedHashSet<>();
|
||||||
|
for (MethodMetadata asmMethod : asmMethods) {
|
||||||
|
for (MethodMetadata reflectionMethod : reflectionMethods) {
|
||||||
|
if (reflectionMethod.getMethodName().equals(asmMethod.getMethodName())) {
|
||||||
|
beanMethods.add(reflectionMethod);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (IOException ex) {
|
catch (IOException ex) {
|
||||||
logger.debug("Failed to read class file via ASM for determining @Bean method order", ex);
|
logger.debug("Failed to read class file via ASM for determining @Bean method order", ex);
|
||||||
|
|
Loading…
Reference in New Issue