// Path: src/main/java/com/github/gquintana/metrics/proxy/ProxyFactory.java
// public interface ProxyFactory {
//     /**
//      * Create a proxy using given classloader and interfaces
//      *
//      * @param proxyHandler Proxy invocation handler
//      * @param proxyClass Class loader + Interfaces to implement
//      * @param <T> Proxy type
//      * @return Proxy
//      */
//     <T> T newProxy(ProxyHandler<T> proxyHandler, ProxyClass proxyClass);
// 
// }


import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.SharedMetricRegistries;
import com.codahale.metrics.Timer;
import com.github.gquintana.metrics.proxy.ProxyFactory;
import java.lang.reflect.Constructor;
import java.sql.*;
import java.util.List;
import java.util.Properties;
import java.util.logging.Logger;
                        continue;
                    }
                    int paramIndex = 0;
                    for (Class<?> paramType : ctor.getParameterTypes()) {
                        if (!paramType.isInstance(params[paramIndex])) {
                            break;
                        }
                        paramIndex++;
                    }
                    if (paramIndex != params.length) {
                        continue;
                    }
                    @SuppressWarnings("unchecked")
                    Constructor<T> theCtor = (Constructor<T>) ctor;
                    return theCtor.newInstance(params);
                }
                throw new SQLException("Constructor not found for " + clazz);
            }
        } catch (ReflectiveOperationException reflectiveOperationException) {
            throw new SQLException(reflectiveOperationException);
        }
    }

    @Override
    public Connection connect(String url, Properties info) throws SQLException {
        if (!acceptsURL(url)) {
            return null;
        }
        DriverUrl driverUrl = DriverUrl.parse(url);
        MetricRegistry registry = getMetricRegistry(driverUrl);
// Path: src/main/java/com/github/gquintana/metrics/proxy/ProxyFactory.java
// public interface ProxyFactory {
//     /**
//      * Create a proxy using given classloader and interfaces
//      *
//      * @param proxyHandler Proxy invocation handler
//      * @param proxyClass Class loader + Interfaces to implement
//      * @param <T> Proxy type
//      * @return Proxy
//      */
//     <T> T newProxy(ProxyHandler<T> proxyHandler, ProxyClass proxyClass);
// 
// }


// Path: src/main/java/com/github/gquintana/metrics/sql/Driver.java
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.SharedMetricRegistries;
import com.codahale.metrics.Timer;
import com.github.gquintana.metrics.proxy.ProxyFactory;
import java.lang.reflect.Constructor;
import java.sql.*;
import java.util.List;
import java.util.Properties;
import java.util.logging.Logger;

                        continue;
                    }
                    int paramIndex = 0;
                    for (Class<?> paramType : ctor.getParameterTypes()) {
                        if (!paramType.isInstance(params[paramIndex])) {
                            break;
                        }
                        paramIndex++;
                    }
                    if (paramIndex != params.length) {
                        continue;
                    }
                    @SuppressWarnings("unchecked")
                    Constructor<T> theCtor = (Constructor<T>) ctor;
                    return theCtor.newInstance(params);
                }
                throw new SQLException("Constructor not found for " + clazz);
            }
        } catch (ReflectiveOperationException reflectiveOperationException) {
            throw new SQLException(reflectiveOperationException);
        }
    }

    @Override
    public Connection connect(String url, Properties info) throws SQLException {
        if (!acceptsURL(url)) {
            return null;
        }
        DriverUrl driverUrl = DriverUrl.parse(url);
        MetricRegistry registry = getMetricRegistry(driverUrl);
        ProxyFactory factory = newInstance(driverUrl.getProxyFactoryClass());