测试代码高亮

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@Override
protected Object doGetInjectedBean(AnnotationAttributes attributes, Object bean, String beanName, Class<?> injectedType,
InjectionMetadata.InjectedElement injectedElement) throws Exception {
/**
* The name of bean that annotated Dubbo's {@link Service @Service} in local Spring {@link ApplicationContext}
*/
String referencedBeanName = buildReferencedBeanName(attributes, injectedType);

/**
* The name of bean that is declared by {@link Reference @Reference} annotation injection
*/
String referenceBeanName = getReferenceBeanName(attributes, injectedType);

ReferenceBean referenceBean = buildReferenceBeanIfAbsent(referenceBeanName, attributes, injectedType);

boolean localServiceBean = isLocalServiceBean(referencedBeanName, referenceBean, attributes);

prepareReferenceBean(referencedBeanName, referenceBean, localServiceBean);

registerReferenceBean(referencedBeanName, referenceBean, attributes, localServiceBean, injectedType);

cacheInjectedReferenceBean(referenceBean, injectedElement);

return referenceBean.get();
}