- java.lang.Object
- 
- io.github.mmm.cli.CliMain
- 
- io.github.mmm.nls.cli.NlsMain
 
 
- 
- Direct Known Subclasses:
- NlsSynchronizer
 
 public abstract class NlsMain extends CliMain Main program(CLI) .
- 
- 
Constructor SummaryConstructors Constructor Description NlsMain()The constructor.NlsMain(CliConsole console)The constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadd(CliCommand command)protected StringgetProgramName()protected booleanisPrintHelpPerCommand()protected booleanisTolerateDuplicateOptions()protected voidprintHelp()Prints the help usage of this program.intrun(CliArgs args)Has to be implemented to handle that givenCliArgsand do the program logic.- 
Methods inherited from class io.github.mmm.cli.CliMainconsole, error, error, getVersion, run, runAndExit
 
- 
 
- 
- 
- 
Constructor Detail- 
NlsMainpublic NlsMain() The constructor.
 - 
NlsMainpublic NlsMain(CliConsole console) The constructor.- Parameters:
- console- the- console.
 
 
- 
 - 
Method Detail- 
addprotected void add(CliCommand command) - Parameters:
- command- the- CliCommandto register.
 
 - 
isTolerateDuplicateOptionsprotected boolean isTolerateDuplicateOptions() Typically a program shall provide multiple values for aCliOptionby providing them as multipleCliValues after theCliOption(e.g. "--keys foo bar some"). However, some programs like to repeat the sameCliOptionfor that purpose (e.g. "--key foo --key bar --key some"). By default this will cause an error as it is not recommended. However, if you want to support this in your CLI program, you may override this method.- Returns:
- trueto tolerate duplicate occurrences of the same- CliOption,- falseotherwise (default).
 
 - 
runpublic final int run(CliArgs args) Description copied from class:CliMainHas to be implemented to handle that givenCliArgsand do the program logic.
 - 
isPrintHelpPerCommandprotected boolean isPrintHelpPerCommand() - Returns:
- trueif the help shall be printed per- CliCommandwith all its arguments (options and parameters),- falseotherwise (to first print all- CliCommands and then print all arguments together).
 
 - 
getProgramNameprotected String getProgramName() - Returns:
- the name of this program.
 
 - 
printHelpprotected void printHelp() Prints the help usage of this program.
 
- 
 
-