protected Class<?> extractFromProxy(Class<?> clazz) {
        if (Proxy.isProxyClass(clazz)) {
            clazz = extractFromProxy(clazz.getInterfaces()[0]);
        } else {
            try {
                if (Class.forName("javassist.util.proxy.ProxyObject").isAssignableFrom(clazz)) {
                    clazz = extractFromProxy(clazz.getSuperclass());
                }
            } catch (ClassNotFoundException ex) {
                if (log.isDebugEnabled())
                    log.debug("Class javassist.util.proxy.ProxyObject can not be located");
            }
        }
        return clazz;
    }