class SofaProtoUtils {

    public static boolean checkIfUseGeneric(ConsumerConfig consumerConfig) {
        Class proxyClass = consumerConfig.getProxyClass();
        Class enclosingClass = proxyClass.getEnclosingClass();
        if (enclosingClass != null) {
            try {
                enclosingClass.getDeclaredMethod("getSofaStub", Channel.class, CallOptions.class, int.class);
                return false;
            } catch (NoSuchMethodException e) {
                //ignore
                return true;
            }
        }

        return true;
    }

}