code: public static void addShutdownHook(Object self, Closure closure) {
          Runtime.getRuntime().addShutdownHook(new Thread(closure));
      }
docs: Allows the usage of addShutdownHook without getting the runtime first.
  
  @param self    the object the method is called on (ignored)
  @param closure the shutdown hook action
  @since 1.5.0