Class SystemUtils

java.lang.Object
is.galia.util.SystemUtils

public final class SystemUtils extends Object
  • Method Details

    • clearExitRequest

      public static void clearExitRequest()
      Clears any exit request created by exit(int).
    • exit

      public static void exit(int code)

      Conditionally exits depending on the return value of Application.isTesting():

      1. If that method returns false, System.exit(int) is called.
      2. Otherwise, it is not called, but subsequent calls to exitRequested() will return true, and requestedExitCode() will return the requested exit code.
      Parameters:
      code - Status code.
    • exitRequested

      public static boolean exitRequested()
      Returns:
      Whether exit(int) has been invoked.
    • requestedExitCode

      public static int requestedExitCode()
      Returns:
      Exit code passed to exit(int). This is meaningless unless exitRequested() returns true.