|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mcdermottroe.exemplar.ui.cli.Main
public final class Main
A class to provide a main entry point for the program.
| Field Summary | |
|---|---|
private static ExitHandler |
exitHandler
The exit handler. |
private static Timer |
timer
A timer for the application. |
| Constructor Summary | |
|---|---|
private |
Main()
Private constructor to prevent instantiation of this class. |
| Method Summary | |
|---|---|
private static void |
abort(int code,
CharSequence message)
Shorthand for an unclean exit. |
private static void |
cleanExit(CharSequence message)
Shorthand for a clean exit. |
static ExitHandler |
getExitHandler()
Get the current ExitHandler. |
static void |
main(String[] args)
The main entry point for the program. |
static void |
setExitHandler(ExitHandler handler)
Set a new ExitHandler. |
private static String |
usageMessage()
Format a usage message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static Timer timer
private static ExitHandler exitHandler
| Constructor Detail |
|---|
private Main()
| Method Detail |
|---|
public static void main(String[] args)
args - The arguments passed to the programprivate static String usageMessage()
public static ExitHandler getExitHandler()
ExitHandler.
ExitHandler.public static void setExitHandler(ExitHandler handler)
ExitHandler.
handler - The new ExitHandler.private static void cleanExit(CharSequence message)
Constants.UI.CLI.EXIT_SUCCESS.
message - A message to send to the user. If this is null, nothing
is sent.
private static void abort(int code,
CharSequence message)
code - The value to pass to ExitHandler.exit(int).message - An optional message to log (only logged if non-null).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||