@Override
  public UiBinder<?, ?> getFake(final Class<?> type) {
    return (UiBinder<?, ?>) Proxy.newProxyInstance(
        FakeUiBinderProvider.class.getClassLoader(),
        new Class<?>[] {type},
        new InvocationHandler() {
          @Override
          public Object invoke(Object proxy, Method method, Object[] args) throws Exception {
            // createAndBindUi is the only method defined by UiBinder
            for (Field field : getAllFields(args[0].getClass())) {
              if (field.isAnnotationPresent(UiField.class)
                  && !field.getAnnotation(UiField.class).provided()) {
                field.setAccessible(true);
                field.set(args[0], GWT.create(field.getType()));
              }
            }
            return GWT.create(getUiRootType(type));
          }
        });
  }
@ Override public UiBinder < ? , ? > getFake ( final Class < ? > type ) { return ( UiBinder < ? , ? > ) Proxy . newProxyInstance ( FakeUiBinderProvider . class . getClassLoader ( ) , new Class < ? > [ ] { type } , new InvocationHandler ( ) { @ Override public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Exception { for ( Field field : getAllFields ( args [ 0 ] . getClass ( ) ) ) { if ( field . isAnnotationPresent ( UiField . class ) && ! field . getAnnotation ( UiField . class ) . provided ( ) ) { field . setAccessible ( true ) ; field . set ( args [ 0 ] , GWT . create ( field . getType ( ) ) ) ; } } return GWT . create ( getUiRootType ( type ) ) ; } } ) ; }
Returns a new instance of FakeUiBinder that implements the given interface.
This is accomplished by returning a dynamic proxy object that delegates
calls to a backing FakeUiBinder.

@param type interface to be implemented by the returned type. This must
represent an interface that directly extends {@link UiBinder}.