net.dontdrinkandroot.utils.cli

## Class CommandLineArgumentMain

- java.lang.Object
- - net.dontdrinkandroot.utils.cli.CommandLineArgumentMain

    public abstract class CommandLineArgumentMain
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`CommandLineArgumentMain()`

### Method Summary

Methods
`protected boolean` `handleFailure(CommandLineArgumentParser parser)`
`abstract void` `run()`
`protected void` `runFailed(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(String[] args)`
`protected boolean` `setupFailed(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(String[] args)

#### setupFailed

    protected boolean setupFailed(Exception e)

Handle exceptions thrown during setup.

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

#### runFailed

    protected void runFailed(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 Exception

Hook where initialization can be performed after the arguments have been parsed

Throws:
  `Exception`

#### run

    public abstract void run()
                      throws Exception

Throws:
  `Exception`