ArgumentsHandler

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jagatoo.commandline
Class ArgumentsHandler

    java.lang.Object
      org.jagatoo.commandline.ArgumentsHandler

    public abstract class ArgumentsHandler

extends java.lang.Object

Handles arguments from the command line.

Author:
  Marvin Froehlich (aka Qudus)

Constructor Summary
`ArgumentsHandler()`

Method Summary
`protected abstract void` | `handleArgument(Argument arg, java.lang.Object value)` This method is called when the parser has identified an argument with or without a value.
`protected void` | `onError(int chunk, java.lang.String message)` This method is called when a serious error is detected byy the parser.
`protected abstract void` | `validate(int numArguments)` This method is called after the whole command line has been parsed.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ArgumentsHandler

    public ArgumentsHandler()

Method Detail

### handleArgument

    protected abstract void handleArgument(Argument arg,
                                           java.lang.Object value)

  This method is called when the parser has identified an argument with or without a value.

  Parameters:
    `arg` - the detected argument (null for loose values)
    `value` - the value (null for no-value-arguments)

### onError

    protected void onError(int chunk,
                           java.lang.String message)
                    throws CommandlineParsingException

  This method is called when a serious error is detected byy the parser.

  Parameters:
    `chunk` - the command line chunk number
    `message` - the error message
  Throws:
    `CommandlineParsingException`

### validate

    protected abstract void validate(int numArguments)
                              throws CommandlineParsingException

  This method is called after the whole command line has been parsed.

  Parameters:
    `numArguments` - the number of handled `Argument`s
  Throws:
    `CommandlineParsingException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD