MCPcopy Create free account
hub / github.com/PCGen/pcgen / registerExitFunction

Method registerExitFunction

code/src/java/pcgen/util/GracefulExit.java:127–141  ·  view source on GitHub ↗

Registers an exit function to be called when the JVM exits. This method can be called before or after shutdown has started, otherwise an exception will be thrown. @param exitFunction The exit function to register

(ExitFunction exitFunction)

Source from the content-addressed store, hash-verified

125 * @param exitFunction The exit function to register
126 */
127 public static void registerExitFunction(ExitFunction exitFunction)
128 {
129 try
130 {
131 lock.lock();
132 if (isShuttingDown)
133 {
134 throw new IllegalStateException("Cannot register an exit function after shutdown has started");
135 }
136 GracefulExit.exitFunction = exitFunction;
137 } finally
138 {
139 lock.unlock();
140 }
141 }
142}

Callers 14

setUpMethod · 0.95
tearDownMethod · 0.95
tearDownMethod · 0.95
runTestMethod · 0.95
initializeMethod · 0.95
cleanupMethod · 0.95
testHelpArgsMethod · 0.95
setUpMethod · 0.95
testDefaultExitMethod · 0.95
testAddHookDuringExitMethod · 0.95

Calls

no outgoing calls

Tested by 14

setUpMethod · 0.76
tearDownMethod · 0.76
tearDownMethod · 0.76
runTestMethod · 0.76
initializeMethod · 0.76
cleanupMethod · 0.76
testHelpArgsMethod · 0.76
setUpMethod · 0.76
testDefaultExitMethod · 0.76
testAddHookDuringExitMethod · 0.76