fr.umlv.tatoo.cc.common.main
Interface OptionRegistry<D>

Type Parameters:
D - type od tha user data.
All Known Implementing Classes:
CommandLineParser

public interface OptionRegistry<D>

Represents a registry of options.

Author:
remi

Method Summary
 void registerOption(String optionName, Command<? super D> command, int numberOfArgument)
          register an option with a name a command to execute and a number of option argument.
 void registerOption(String prefix, String optionName, Command<? super D> command, int numberOfArgument)
          register an option with a specific prefix, a name a command to execute and a number of option argument.
 

Method Detail

registerOption

void registerOption(String optionName,
                    Command<? super D> command,
                    int numberOfArgument)
register an option with a name a command to execute and a number of option argument. The prefix of the option is the default prefix of the command line parser see CommandLineParser(defaultPrefix,usageFormatter,commands).

Parameters:
optionName - the name of the option.
command - the command associated with the option.
numberOfArgument - hte number of argument of the option.

registerOption

void registerOption(String prefix,
                    String optionName,
                    Command<? super D> command,
                    int numberOfArgument)
register an option with a specific prefix, a name a command to execute and a number of option argument.

Parameters:
prefix - the specific prefix of the option.
optionName - the name of the option.
command - the command associated with the option.
numberOfArgument - hte number of argument of the option.
See Also:
registerOption(String, Command, int)