package com.brframework.commondistributed.core;
import java.lang.reflect.Method;

/**
 * 分布式锁Spring EL表达式内置对象
 * @Author xu
 * @Date 2018/2/23 0023 上午 11:14
 */
public class DistributedExpressionRootObject {

    private final Method method;

    private final String methodName;

    private final Object[] args;

    private final Object target;

    private final String targetClassName;

    public DistributedExpressionRootObject(Method method, Object[] args, Object target) {

        this.method = method;
        this.methodName = method.getName();
        this.target = target;
        this.targetClassName = target.getClass().getName();
        this.args = args;
    }

    public Method getMethod() {
        return method;
    }

    public String getMethodName(){
        return methodName;
    }

    public Object[] getArgs() {
        return args;
    }

    public Object getTarget() {
        return target;
    }

    public String getTargetClassName() {
        return targetClassName;
    }
}
