Introduce getDeclaredMethods() for MethodMetadata of all user-declared methods

Closes gh-27701
This commit is contained in:
Juergen Hoeller
2021-12-15 13:32:42 +01:00
parent efaccd6356
commit 50c7c84886
7 changed files with 67 additions and 64 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -397,6 +397,7 @@ class AnnotationMetadataTests {
}
private void doTestMethodAnnotationInfo(AnnotationMetadata classMetadata) {
assertThat(classMetadata.getDeclaredMethods()).hasSize(3);
Set<MethodMetadata> methods = classMetadata.getAnnotatedMethods(TestAutowired.class.getName());
assertThat(methods).hasSize(1);
for (MethodMetadata methodMetadata : methods) {
@@ -503,6 +504,9 @@ class AnnotationMetadataTests {
@NamedComposedAnnotation
private static class AnnotatedComponent implements Serializable {
public AnnotatedComponent() {
}
@TestAutowired
public void doWork(@TestQualifier("myColor") java.awt.Color color) {
}