|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dellroad.jvser.client.MainClass
public abstract class MainClass
Support superclass for command line classes.
| Field Summary | |
|---|---|
protected Logger |
log
|
| Constructor Summary | |
|---|---|
protected |
MainClass()
|
| Method Summary | |
|---|---|
protected void |
doMain(String[] args)
Invokes run(java.lang.String[]), catching any exceptions thrown and exiting with a non-zero
value if and only if an exception was caught. |
protected void |
errout(String message)
Emit an error message an exit with exit value 1. |
protected abstract int |
run(String[] args)
Subclass main implementation. |
protected void |
setupLogging(Level logLevel)
Setup logging. |
protected void |
usageError()
Print the usage message and exit with exit value 1. |
protected abstract void |
usageMessage()
Display the usage message to standard error. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Logger log
| Constructor Detail |
|---|
protected MainClass()
| Method Detail |
|---|
protected abstract int run(String[] args)
throws Exception
Exceptionprotected abstract void usageMessage()
protected void usageError()
protected void setupLogging(Level logLevel)
protected final void errout(String message)
protected void doMain(String[] args)
run(java.lang.String[]), catching any exceptions thrown and exiting with a non-zero
value if and only if an exception was caught.
The concrete class' main() method should invoke this method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||