package cz.senslog.connector.tools.interceptor;

import net.sf.cglib.proxy.Enhancer;

/**
 * Util class allows to make easier mock instance from real instance or class.
 *
 * @author Lukas Cerny
 * @version 1.0
 * @since 1.8
 */

public final class ProxyUtils {

    /**
     * Create instance of utils class is prohibited.
     */
    private ProxyUtils(){}

    public static <A> A createProxy(Class<A> aClass, AbstractMethodInterceptor interceptor) {
        return  (A)Enhancer.create(aClass, interceptor);
    }
}
