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."); }

猜你喜欢

转载自www.cnblogs.com/toUpdating/p/9142614.html