/** * Creates a {@link Proxy} implementation for a given set of interface types. In this created * class all methods will be empty, with return values for non-void methods being the appropriate * default value ({@literal 0} for {@code int}, {@literal null} for a reference type, and so on). * * <p>The {@code equals}, {@code hashCode}, and {@code toString} methods inherited from {@code * java.lang.Object} are overridden with an appropriate implementation in each case: {@code * equals} is implemented by comparing the two object references (the proxy instance and the * method argument) for equality; {@code hashCode} is implemented to return the identity hash code * for the proxy instance; and {@code toString} returns the standard string representation that * {@code Object#toString} would have returned. * * <p>This method is just a convenience for some uses of the <em>Mockups</em> API. In <em>JMockit * Expectations</em> in particular, mocked instances will be automatically created and assigned to * any mock fields or parameters. * * @param interfacesToBeProxied one or more {@code Type} objects, each of which can be a {@code * Class} object for an interface, a {@link ParameterizedType} whose raw type is an interface, * or a {@link TypeVariable} whose bounds are interfaces * @return the created proxy instance */ public static <E> E newEmptyProxy(Type... interfacesToBeProxied) { return Utilities.newEmptyProxy(null, interfacesToBeProxied); }