public static Object createShutdownProxy ( Object o , Class [ ] interfaces , Shutdown shutdown ) { if ( interfaces == null ) interfaces = ReflectUtils . extractAllInterfaces ( o ) ; return Proxy . newProxyInstance ( o . getClass ( ) . getClassLoader ( ) , interfaces , new ShutdownProxy ( o , shutdown ) ) ; }
Creates the proxy to check for shutdown .