/**
* Detect relationships in annotated {@link Bean @Bean} Factory methods.
*
* @return Relationships detected from factory methods.
*/
protected Set<Relationship> detectAnnotatedFactoryMethods() {
Set<Relationship> result = new HashSet<>();
/* retrieve all beans declared in the application context */
String[] annotateBeans = applicationContext.getBeanDefinitionNames();
ConfigurableBeanFactory factory = applicationContext.getBeanFactory();
for (String beanName : annotateBeans) {
/* ... and get the bean definition of each declared beans */
Optional<MethodMetadata> metadata = getMethodMetadata(factory.getMergedBeanDefinition(beanName));
if (metadata.isPresent()) {
Set<Relationship> rel = detectMethodMetadata(metadata.get());
result.addAll(rel);
}
}
return result;
}
AnnotationRelationshipDetector.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:cereebro
作者:
评论列表
文章目录