@Primary/@Lazy/@DependsOn supported as meta-annotations; @Bean supported as meta-annotation on factory methods as well

This commit is contained in:
Juergen Hoeller
2009-07-22 15:23:22 +00:00
parent a4bbd9abda
commit f519406c37
17 changed files with 156 additions and 123 deletions

View File

@@ -84,11 +84,10 @@ public class AnnotationMetadataTests extends TestCase {
}
private void doTestMethodAnnotationInfo(AnnotationMetadata classMetadata) {
Set<MethodMetadata> methods = classMetadata.getAnnotatedMethods("org.springframework.beans.factory.annotation.Autowired");
Set<MethodMetadata> methods = classMetadata.getAnnotatedMethods(Autowired.class.getName());
assertEquals(1, methods.size());
for (MethodMetadata methodMetadata : methods) {
Set<String> annotationTypes = methodMetadata.getAnnotationTypes();
assertEquals(1, annotationTypes.size());
assertTrue(methodMetadata.isAnnotated(Autowired.class.getName()));
}
}