org.inria.myriads.snoozeclient.parser.api.impl
Class JCommanderCLI

java.lang.Object
  extended by org.inria.myriads.snoozeclient.parser.api.impl.JCommanderCLI
All Implemented Interfaces:
CommandLineParser

public final class JCommanderCLI
extends Object
implements CommandLineParser

Implementation of the JCommander based CLI. Based on the excellent Karl Heinz Marbaise tutorial: http://blog.soebes.de/index.php?/archives/241-Kommandozeile-und-Java.html https://github.com/khmarbaise/cli-test/tree/master/src/main/java/com/soebes/cli/cli_test

Author:
Eugen Feller

Constructor Summary
JCommanderCLI()
          Constructor.
 
Method Summary
 AddCommand getAddCommand()
          Returns the add command.
 ClientCommand getCommand()
          Returns the parsed command.
 DefineCommand getDefineCommand()
          Returns the define command.
 DestroyCommand getDestroyCommand()
          Returns the destroy command.
 InfoCommand getInfoCommand()
          Returns the info command.
 ListCommand getListCommand()
          Returns the list command.
 RemoveCommand getRemoveCommand()
          Returns the remove command.
 ResumeCommand getResumeCommand()
          Returns the resume command.
 ShutdownCommand getShutdownCommand()
          Returns the shutdown command.
 StartCommand getStartCommand()
          Returns the start command.
 SuspendCommand getSuspendCommand()
          Returns the suspend command.
 UndefineCommand getUndefineCommand()
          Returns the undefine command.
 ParserOutput parse(String[] args)
          Helper function to generate a ParserOutput object from the JCInputOptions content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCommanderCLI

public JCommanderCLI()
Constructor.

Method Detail

parse

public ParserOutput parse(String[] args)
Helper function to generate a ParserOutput object from the JCInputOptions content.

Specified by:
parse in interface CommandLineParser
Parameters:
args - Arguments to parse
Returns:
Parser output

getCommand

public ClientCommand getCommand()
Returns the parsed command.

Returns:
The command

getAddCommand

public AddCommand getAddCommand()
Returns the add command.

Returns:
The add command

getRemoveCommand

public RemoveCommand getRemoveCommand()
Returns the remove command.

Returns:
The remove command

getDefineCommand

public DefineCommand getDefineCommand()
Returns the define command.

Returns:
The define command

getUndefineCommand

public UndefineCommand getUndefineCommand()
Returns the undefine command.

Returns:
The undefine command

getStartCommand

public StartCommand getStartCommand()
Returns the start command.

Returns:
The destroy command

getShutdownCommand

public ShutdownCommand getShutdownCommand()
Returns the shutdown command.

Returns:
The shutdown command

getDestroyCommand

public DestroyCommand getDestroyCommand()
Returns the destroy command.

Returns:
The destroy command

getSuspendCommand

public SuspendCommand getSuspendCommand()
Returns the suspend command.

Returns:
The suspend command

getResumeCommand

public ResumeCommand getResumeCommand()
Returns the resume command.

Returns:
The resume command

getInfoCommand

public InfoCommand getInfoCommand()
Returns the info command.

Returns:
The info command

getListCommand

public ListCommand getListCommand()
Returns the list command.

Returns:
The list command


Copyright © 2012. All Rights Reserved.