> > 不知道我是否理解你的意思了。
> > 因为你说你有 ReferenceConfig ,所以我觉得可以通过反射来获取到你想调用方法的参数类型。
> > ```
> >  Method[] methods = ReferenceConfig.getInterfaceClass().getMethods();
> >         for (Method method : methods) {
> >             Class<?>[] parameter = method.getParameterTypes();
> >         }
> > ```
> 
> 没有,这个是通过泛型引用创建的,里面只有 `$invoke` 这个方法
> <img alt="2019-01-07 7 40 37" width="987" 
> src="https://user-images.githubusercontent.com/4575409/50766444-325ed600-12b4-11e9-98db-623d1d8bd429.png";>

没使用过泛化调用,但是我看了一下文档
 ```
ReferenceConfig<GenericService> reference = new 
ReferenceConfig<GenericService>(); 
// 弱类型接口名
reference.setInterface("com.xxx.XxxService");  
reference.setVersion("1.0.0");
// 声明为泛化接口 
reference.setGeneric(true);  
```
你已经获取到了需要调用的接口类型 也就是 "com.xxx.XxxService”, 反射它就好了。


[ Full content available at: 
https://github.com/apache/incubator-dubbo/issues/3161 ]
This message was relayed via gitbox.apache.org for 
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to