Introduce getDeclaredMethods() for MethodMetadata of all user-declared methods
Closes gh-27701
This commit is contained in:
@@ -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) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user