zoukankan      html  css  js  c++  java
  • dubbo Wrapper

     1 public com.alibaba.dubbo.common.bytecode.Wrapper0 exteneds Wrapper{
     2     
     3 
     4     public static String[] pns;
     5     public static java.util.Map pts;
     6     public static String[] mns; // all method name array.
     7     public static String[] dmns;
     8      
     9     public static Class[] mts0;
    10     public static Class[] mts1;
    11     public static Class[] mts2;
    12     public static Class[] mts3;
    13     public static Class[] mts4;
    14 
    15     public String[] getPropertyNames(){ return pns; }
    16     public boolean hasProperty(String n){ return pts.containsKey($1); }
    17     public Class getPropertyType(String n){ return (Class)pts.get($1); }
    18     public String[] getMethodNames(){ return mns; }
    19     public String[] getDeclaredMethodNames(){ return dmns; }
    20 
    21     public void setPropertyValue(Object o, String n, Object v){
    22         com.alibaba.dubbo.config.api.DemoService w; 
    23         try{
    24             w = ((com.alibaba.dubbo.config.api.DemoService)$1); 
    25         }catch(Throwable e){ 
    26            throw new IllegalArgumentException(e); 
    27         } 
    28         throw new com.alibaba.dubbo.common.bytecode.NoSuchPropertyException("Not found property ""+$2+"" filed or setter method in class com.alibaba.dubbo.config.api.DemoService."); 
    29     }
    30 
    31 
    32 
    33     public Object getPropertyValue(Object o, String n){
    34         com.alibaba.dubbo.config.api.DemoService w; 
    35         try{
    36             w = ((com.alibaba.dubbo.config.api.DemoService)$1); 
    37         }catch(Throwable e){
    38             throw new IllegalArgumentException(e); 
    39         }
    40         if( $2.equals("box") ){ return ($w)w.getBox(); }
    41         throw new com.alibaba.dubbo.common.bytecode.NoSuchPropertyException("Not found property ""+$2+"" filed or setter method in class com.alibaba.dubbo.config.api.DemoService."); 
    42     }
    43 
    44 
    45     public Object invokeMethod(Object o, String n, Class[] p, Object[] v) throws java.lang.reflect.InvocationTargetException{
    46         com.alibaba.dubbo.config.api.DemoService w; 
    47         try{ 
    48             w = ((com.alibaba.dubbo.config.api.DemoService)$1); 
    49         }catch(Throwable e){
    50             throw new IllegalArgumentException(e); 
    51         } 
    52         try{ 
    53             if( "sayName".equals( $2 )  &&  $3.length == 1 ) {
    54                 return ($w)w.sayName((java.lang.String)$4[0]); 
    55             } 
    56             if( "getBox".equals( $2 )  &&  $3.length == 0 ) {
    57                 return ($w)w.getBox(); 
    58             } 
    59             if( "getUsers".equals( $2 )  &&  $3.length == 1 ) {
    60                 return ($w)w.getUsers((java.util.List)$4[0]); 
    61             } 
    62             if( "echo".equals( $2 )  &&  $3.length == 1 ) {
    63                 return ($w)w.echo(((Number)$4[0]).intValue()); 
    64             } 
    65             if( "throwDemoException".equals( $2 )  &&  $3.length == 0 ) {
    66                 w.throwDemoException(); return null; 
    67             } 
    68         } catch(Throwable e) {
    69             throw new java.lang.reflect.InvocationTargetException(e);  
    70         } 
    71         throw new com.alibaba.dubbo.common.bytecode.NoSuchMethodException("Not found method ""+$2+"" in class com.alibaba.dubbo.config.api.DemoService."); 
    72     }
    73 }
  • 相关阅读:
    使用变焦摄影镜头的10条经验
    Savage 2:灵魂拷问者Linux即时战略游戏
    在FlashCom中检测摄像头和麦克风的方法
    Asp.net 在线转Flv
    linux的启动加密
    一个命令轻轻松松重新初始化Ubuntu软件包
    Firefox扩展开发学习杂记
    使用 XUL 实现浏览器扩展,第 1 部分: 使用用户界面特性创建一个 Firefox 浏览
    ffmpeg参数解释中文详细
    用mencoder解决ffmpeg转换wmv/asf to flv花屏的问题,并支持rm/rmvb
  • 原文地址:https://www.cnblogs.com/toUpdating/p/9142614.html
Copyright © 2011-2022 走看看