- java.lang.Object
-
- io.github.mmm.nls.cli.AbstractCliCommand
-
- All Implemented Interfaces:
CliCommand
- Direct Known Subclasses:
CliCommandHelp,CliCommandVersion,NlsSynchronizer.Synchronizer
public abstract class AbstractCliCommand extends Object implements CliCommand
Abstract base implementation ofCliCommand.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description AbstractCliCommand(Localizable help)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <P extends CliProperty<?>>
Padd(P property)CliConsoleconsole()LocalizablegetHelp()Collection<CliProperty<?>>getProperties()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.mmm.nls.cli.CliCommand
run
-
-
-
-
Constructor Detail
-
AbstractCliCommand
public AbstractCliCommand(Localizable help)
The constructor.- Parameters:
help- thehelp message.
-
-
Method Detail
-
add
protected <P extends CliProperty<?>> P add(P property)
- Type Parameters:
P- type of the givenCliProperty.- Parameters:
property- theCliPropertyto add.- Returns:
- the given
CliProperty.
-
getHelp
public Localizable getHelp()
- Specified by:
getHelpin interfaceCliCommand- Returns:
- the
Localizabledescribing this command.
-
getProperties
public Collection<CliProperty<?>> getProperties()
- Specified by:
getPropertiesin interfaceCliCommand- Returns:
- the available
propertiesof thisCliCommand.
-
console
public CliConsole console()
- Returns:
- the
CliConsole.
-
-