code: @SuppressWarnings("unchecked")
  	public static <T> T as(Class<T> t, final Object obj) {
  		return (T) Proxy.newProxyInstance(t.getClassLoader(), new Class[] { t }, new InvocationHandler() {
  			public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
  				try {
  					return obj.getClass().getMethod(method.getName(), method.getParameterTypes()).invoke(obj, args);
  				} catch (NoSuchMethodException nsme) {
  					throw new NoSuchMethodError(nsme.getMessage());
  				} catch (InvocationTargetException ite) {
  					throw ite.getTargetException();
  				}
  			}
  		});
  	}
docs: <p>
  as.
  </p>
  
  @param t
  a {@link java.lang.Class} object.
  @param obj
  a {@link java.lang.Object} object.
  @param <T>
  a T object.
  @return a T object.