public static void addShutdownHook ( Object self , Closure closure ) { Runtime . getRuntime ( ) . addShutdownHook ( new Thread ( closure ) ) ; }
Allows the usage of addShutdownHook without getting the runtime first .