protected Object readResolve ( ) throws ObjectStreamException { try { Class < ? > proxyClass = getProxyClass ( ) ; Object instance = proxyClass . newInstance ( ) ; ProxyFactory . setInvocationHandlerStatic ( instance , handler ) ; return instance ; } catch ( InstantiationException e ) { throw new RuntimeException ( e ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } catch ( ClassNotFoundException e ) { throw new RuntimeException ( e ) ; } }
Resolve the serialized proxy to a real instance .