View Javadoc

1   // Shutdown.java, created Thu Jul  4  4:50:03 2002 by joewhaley
2   // Copyright (C) 2001-3 John Whaley <jwhaley@alum.mit.edu>
3   // Licensed under the terms of the GNU LGPL; see COPYING for details.
4   package joeq.ClassLib.Common.java.lang;
5   
6   import joeq.Runtime.SystemInterface;
7   import jwutil.util.Assert;
8   
9   /***
10   * Shutdown
11   *
12   * @author  John Whaley <jwhaley@alum.mit.edu>
13   * @version $Id: Shutdown.java 1941 2004-09-30 03:37:06Z joewhaley $
14   */
15  abstract class Shutdown {
16      
17      static void halt(int status) {
18          SystemInterface.die(status);
19          Assert.UNREACHABLE();
20      }
21      private static void runAllFinalizers() {
22          try {
23              joeq.ClassLib.Common.java.lang.ref.Finalizer.runAllFinalizers();
24          } catch (java.lang.Throwable x) {
25          }
26      }
27      
28  }