package com.willalp;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;

@Slf4j
public class NewClass {
    public String doTest(Object obj, String methodName, Class[] clazzs, Object... args) {
        try {
            return (String) obj.getClass().getMethod(methodName, clazzs).invoke(obj, args);
        } catch (Exception e) {
            log.info("[doMethod] Exception methodName:{}, args:{}", methodName, JSON.toJSONString(args), e);
        }
        return StringUtils.EMPTY;
    }

    public String say(String msg) {
        System.out.println("say: " + msg);
        return "success";
    }

    public String run(Integer distance) {
        System.out.println("run: " + distance);
        return "success";
    }
    public String wqxRun(Integer distance) {
        System.out.println("wqxRun: " + distance);
        return "success";
    }
}


