code: @SuppressWarnings("unchecked")
          public static <T> T proxy(InvocationHandler handler, T toProxy) {
                  return (T) Proxy.newProxyInstance(toProxy.getClass().getClassLoader(), toProxy.getClass().getInterfaces(), handler);
          }
docs: generate proxy object with given InvocationHandler and the object to
  do proxy
  
  @param handler InvocationHandler instance
  @param toProxy the object to do proxy
  @return proxy object generated with Proxy.newProxyInstance(...)
  @see InvocationHandler
  @see Proxy#newProxyInstance(ClassLoader, Class[], InvocationHandler)