码迷,mamicode.com
首页 > 移动开发 > 详细

dubbo Wrapper

时间:2018-06-06 01:00:51      阅读:359      评论:0      收藏:0      [点我收藏+]

标签:$1   names   OLE   oca   intval   ali   tde   ber   val   

 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

标签:$1   names   OLE   oca   intval   ali   tde   ber   val   

原文地址:https://www.cnblogs.com/toUpdating/p/9142614.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!