All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.taobao.hsf.lightapi.util.GenericMethod Maven / Gradle / Ivy

The newest version!
package com.taobao.hsf.lightapi.util;

import com.alibaba.dubbo.common.utils.PojoUtils;

/**
 * Created by arthur.xqw on 2015/8/31.
 */
public class GenericMethod {
    private String methodName;
    private String[] argsType=new String[]{};
    private Object[] argsVal=new Object[]{};

    public GenericMethod(){

    }
    public GenericMethod(String methodName){
        this.methodName(methodName);
    }

    public GenericMethod methodName(String methodName){
        this.methodName = methodName;
        return this;
    }

    public GenericMethod argsType(String[] argsType){
        if(argsType.length!=0)
            this.argsType = argsType;
        return this;
    }

    public static Object generalize(Object pojo){
        return PojoUtils.generalize(pojo);
    }

    public GenericMethod argsVal(Object[] argsVal){
        if(argsVal.length!=0)
            this.argsVal = argsVal;
        return this;
    }

    public String getMethodName() {
        return methodName;
    }

    public String[] getArgsType() {
        return argsType;
    }

    public Object[] getArgsVal() {
        return argsVal;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy