dubbo Wrapper

Posted 持续在更新的博客

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了dubbo Wrapper相关的知识,希望对你有一定的参考价值。

 1 com.alibaba.dubbo.common.bytecode.Wrapper0 exteneds Wrapper{
 2      public static String[] pns;
 3      public static java.util.Map pts;
 4      public static String[] mns;"); // all method name array.
 5      public static String[] dmns;
 6      
 7      public static Class[] mts0;
 8 public static Class[] mts1;
 9 public static Class[] mts2;
10 public static Class[] mts3;
11 public static Class[] mts4;
12 
13 public String[] getPropertyNames(){ return pns; }
14  public boolean hasProperty(String n){ return pts.containsKey($1); }
15 public Class getPropertyType(String n){ return (Class)pts.get($1); }
16 public String[] getMethodNames(){ return mns; }
17 public String[] getDeclaredMethodNames(){ return dmns; }
18 
19 public void setPropertyValue(Object o, String n, Object v){
         com.alibaba.dubbo.config.api.DemoService w;
         try{
                                 w = ((com.alibaba.dubbo.config.api.DemoService)$1);
                             }catch(Throwable e){ throw new IllegalArgumentException(e); } throw new com.alibaba.dubbo.common.bytecode.NoSuchPropertyException("Not found property \""+$2+"\" filed or setter method in class com.alibaba.dubbo.config.api.DemoService."); } 20 21 public Object getPropertyValue(Object o, String n){ com.alibaba.dubbo.config.api.DemoService w; try{ w = ((com.alibaba.dubbo.config.api.DemoService)$1); }catch(Throwable e){ throw new IllegalArgumentException(e); } if( $2.equals("box") ){ return ($w)w.getBox(); } throw new com.alibaba.dubbo.common.bytecode.NoSuchPropertyException("Not found property \""+$2+"\" filed or setter method in class com.alibaba.dubbo.config.api.DemoService."); } 22 23 public Object invokeMethod(Object o, String n, Class[] p, Object[] v) throws java.lang.reflect.InvocationTargetException{ com.alibaba.dubbo.config.api.DemoService w; try{ w = ((com.alibaba.dubbo.config.api.DemoService)$1); }catch(Throwable e){ throw new IllegalArgumentException(e); } try{ if( "throwDemoException".equals( $2 ) && $3.length == 0 ) { w.throwDemoException(); return null; } if( "sayName".equals( $2 ) && $3.length == 1 ) { return ($w)w.sayName((java.lang.String)$4[0]); } if( "getBox".equals( $2 ) && $3.length == 0 ) { return ($w)w.getBox(); } if( "getUsers".equals( $2 ) && $3.length == 1 ) { return ($w)w.getUsers((java.util.List)$4[0]); } if( "echo".equals( $2 ) && $3.length == 1 ) { return ($w)w.echo(((Number)$4[0]).intValue()); } } catch(Throwable e) { throw new java.lang.reflect.InvocationTargetException(e); } throw new com.alibaba.dubbo.common.bytecode.NoSuchMethodException("Not found method \""+$2+"\" in class com.alibaba.dubbo.config.api.DemoService."); }

 

以上是关于dubbo Wrapper的主要内容,如果未能解决你的问题,请参考以下文章

dubbo源码阅读-ProxyFactory之StubProxyFactoryWrapper本地存根

稳定性 耗时 监控原因分析-- dubbo rpc 框架 的线程池,io 连接模型. 客户端,服务端

代码翻译

Vue App 不显示反应器链接片段

使用DOM操作选择列表中的项目

MybatisPlus条件构造器Wrapper分页查询自定义SQLService层接口代码生成器