dubbo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] zhouzhipeng commented on a change in pull request #1511: 增加特性:动态获取Reference服务类
Date Mon, 26 Mar 2018 12:16:25 GMT
zhouzhipeng commented on a change in pull request #1511: 增加特性:动态获取Reference服务类
URL: https://github.com/apache/incubator-dubbo/pull/1511#discussion_r177068640
 
 

 ##########
 File path: dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/AnnotationBean.java
 ##########
 @@ -288,6 +296,73 @@ private Object refer(Reference reference, Class<?> referenceClass)
{ //method.ge
         return referenceConfig.get();
     }
 
+    /**
+     * refer 方法的公开版,将注解参数Reference换为 ReferenceConf 类
+     * @param reference
+     * @param referenceClass
+     * @return
+     */
+    public Object referNew(RefConf reference, Class<?> referenceClass) { //method.getParameterTypes()[0]
+        String interfaceName;
+
+        if (! "".equals( reference.interfaceName)) {
 
 Review comment:
   yes , for convenience, i just copied the refer method to referNew. I  will fix it by extract
a common method.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message