org.hyphenType.exit
Interface StatusCode
- All Known Implementing Classes:
- CanonicalExitCode
public interface StatusCode
Status code enumerations. Enumerations that implement this interface can be
used as status codes, which are arguments for the method
Options#exit(Enum)
.
!ATTENTION! Enum.ordinal()
is used as the status
code, when the method System.exit(int)
is called. Meaning,
the first enumeration constant should necessarily mean successful
program execution, since its ordinal will be zero.
- Author:
- Aurelio Akira M. Matsui
Method Summary |
void |
beforeExit(ExitStatusHelper helper)
A call back method that is invoked by the method
Options#exit(Enum) right before attempting to terminate the VM. |
beforeExit
void beforeExit(ExitStatusHelper helper)
- A call back method that is invoked by the method
Options#exit(Enum)
right before attempting to terminate the VM.
This method can be used to output custom message to the console, for
instance.
This method is similar to a Runtime.addShutdownHook(Thread)
. The
main difference is that this method will be called on the enumeration
constant related to the exit status.
- Parameters:
helper
- A helper object that gives access to some utility methods.
Copyright © 2013. All Rights Reserved.