@ Override protected Class < ? > resolveProxyClass ( final String [ ] interfaces ) throws IOException , ClassNotFoundException { final Class < ? > [ ] interfaceClasses = new Class [ interfaces . length ] ; for ( int i = 0 ; i < interfaces . length ; i ++ ) { interfaceClasses [ i ] = Class . forName ( interfaces [ i ] , false , classLoader ) ; } try { return Proxy . getProxyClass ( classLoader , interfaceClasses ) ; } catch ( final IllegalArgumentException e ) { return super . resolveProxyClass ( interfaces ) ; } }
Create a proxy class that implements the specified interfaces using the specified ClassLoader or the super ClassLoader .