public interface ExitUtils
| 限定符和类型 | 接口和说明 |
|---|---|
static class |
ExitUtils.ExitException |
static class |
ExitUtils.States |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
assertNotTerminated() |
static boolean |
clear()
Clear all previous terminate(..) calls, if there are any.
|
static void |
disableSystemExit()
Disable the use of
System.exit(int). |
static ExitUtils.ExitException |
getFirstExitException() |
static boolean |
isTerminated() |
static void |
setTerminateOnUncaughtException(boolean terminateOnUncaughtException) |
static void |
terminate(int status,
String message,
org.slf4j.Logger log) |
static void |
terminate(int status,
String message,
Throwable throwable,
boolean throwExitException,
org.slf4j.Logger log) |
static void |
terminate(int status,
String message,
Throwable throwable,
org.slf4j.Logger log) |
static ExitUtils.ExitException getFirstExitException()
ExitUtils.ExitException thrown, or null if none thrown yet.static boolean clear()
static boolean isTerminated()
static void assertNotTerminated()
AssertionError - if isTerminated() == true.static void disableSystemExit()
System.exit(int).static void terminate(int status,
String message,
Throwable throwable,
boolean throwExitException,
org.slf4j.Logger log)
throws ExitUtils.ExitException
status - Exit statusmessage - message used to create the ExitExceptionthrowExitException - decide if this method should throw ExitUtils.ExitExceptionExitUtils.ExitException - if throwExitException == true and System.exit is disabled.static void terminate(int status,
String message,
Throwable throwable,
org.slf4j.Logger log)
static void terminate(int status,
String message,
org.slf4j.Logger log)
static void setTerminateOnUncaughtException(boolean terminateOnUncaughtException)
Copyright © 2017–2023 The Apache Software Foundation. All rights reserved.