Object proxyIfReturnTypeIsJdbcInterface(Class<?> returnType,Object toProxy){
  if (toProxy != null) {
    if (Util.isJdbcInterface(returnType)) {
      Class<?> toProxyClass=toProxy.getClass();
      return Proxy.newProxyInstance(toProxyClass.getClassLoader(),Util.getImplementedInterfaces(toProxyClass),getNewJdbcInterfaceProxy(toProxy));
    }
  }
  return toProxy;
}

Object proxyIfReturnTypeIsJdbcInterface ( Class < ? > returnType , Object toProxy ) { if ( toProxy != null ) { if ( Util . isJdbcInterface ( returnType ) ) { Class < ? > toProxyClass = toProxy . getClass ( ) ; return Proxy . newProxyInstance ( toProxyClass . getClassLoader ( ) , Util . getImplementedInterfaces ( toProxyClass ) , getNewJdbcInterfaceProxy ( toProxy ) ) ; } } return toProxy ; }
if the given return type is or implements a jdbc interface , proxies the given object so that we can catch sql errors and fire a connection switch .
