net.dontdrinkandroot.utils.cli
Class CommandLineArgumentMain

java.lang.Object
  extended by net.dontdrinkandroot.utils.cli.CommandLineArgumentMain

public abstract class CommandLineArgumentMain
extends java.lang.Object


Constructor Summary
CommandLineArgumentMain()
           
 
Method Summary
protected  boolean handleFailure(CommandLineArgumentParser parser)
           
abstract  void run()
           
protected  void runFailed(java.lang.Exception e)
          Handle exceptions thrown during run.
protected  void setup()
          Hook where initialization can be performed after the arguments have been parsed
protected  void setupAndRun(java.lang.String[] args)
           
protected  boolean setupFailed(java.lang.Exception e)
          Handle exceptions thrown during setup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandLineArgumentMain

public CommandLineArgumentMain()
Method Detail

setupAndRun

protected final void setupAndRun(java.lang.String[] args)

setupFailed

protected boolean setupFailed(java.lang.Exception e)
Handle exceptions thrown during setup.

Returns:
True if the run method should be executed anyway, false otherwise.

runFailed

protected void runFailed(java.lang.Exception e)
Handle exceptions thrown during run.


handleFailure

protected boolean handleFailure(CommandLineArgumentParser parser)
Returns:
If the failure has been handled and execution should stop.

setup

protected void setup()
              throws java.lang.Exception
Hook where initialization can be performed after the arguments have been parsed

Throws:
java.lang.Exception

run

public abstract void run()
                  throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2013 dontdrinkandroot. All Rights Reserved.