private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException { ois.defaultReadObject(); final Class<? extends T> proxyType = Proxy.getProxyClass(viewType.getClassLoader(), viewType).asSubclass(viewType); final Constructor<? extends T> proxyConstructor; try { proxyConstructor = proxyType.getConstructor(InvocationHandler.class); } catch (NoSuchMethodException e) { throw new NoSuchMethodError("No valid constructor found on proxy class"); } proxyClassSetter.set(this, proxyType); proxyConstructorSetter.set(this, proxyConstructor); hashCodeSetter.setInt( this, calcHashCode(viewType, appName, moduleName, beanName, distinctName)); }