@Override
    public Object invoke(Object proxy, Method method, Object[] paramValues)
        throws Throwable {
        String methodName = method.getName();
        Class[] paramTypes = method.getParameterTypes();
        if ("toString".equals(methodName) && paramTypes.length == 0) {
            return proxyInvoker.toString();
        } else if ("hashCode".equals(methodName) && paramTypes.length == 0) {
            return proxyInvoker.hashCode();
        } else if ("equals".equals(methodName) && paramTypes.length == 1) {
            Object another = paramValues[0];
            return proxy == another ||
                (proxy.getClass().isInstance(another) && proxyInvoker.equals(JDKProxy.parseInvoker(another)));
        }
        SofaRequest sofaRequest = MessageBuilder.buildSofaRequest(method.getDeclaringClass(),
            method, paramTypes, paramValues);
        SofaResponse response = proxyInvoker.invoke(sofaRequest);
        if (response.isError()) {
            throw new SofaRpcException(RpcErrorType.SERVER_UNDECLARED_ERROR, response.getErrorMsg());
        }
        Object ret = response.getAppResponse();
        if (ret instanceof Throwable) {
            throw (Throwable) ret;
        } else {
            if (ret == null) {
                return ClassUtils.getDefaultPrimitiveValue(method.getReturnType());
            }
            return ret;
        }
    }
Instantiates a new Jdk invocation handler.

@param proxyClass   the proxy class
@param proxyInvoker the proxy invoker
core-impl/proxy/src/main/java/com/alipay/sofa/rpc/proxy/jdk/JDKInvocationHandler.java