public class ShellCommand extends Object
Commands consist always of a mainCommand and may have a subcommand. This type is immutable.
| Modifier and Type | Field and Description |
|---|---|
private List<Token> |
arguments
Optional arguments.
|
private MainCommandType |
mainCommand
Obligatory main command.
|
private SubCommandType |
subCommand
Optional sub mainCommand.
|
| Constructor and Description |
|---|
ShellCommand(MainCommandType mainCommand,
SubCommandType subCommand,
List<Token> arguments)
Dedicated constructor.
|
| Modifier and Type | Method and Description |
|---|---|
List<Token> |
getArguments()
Get arguments.
|
MainCommandType |
getMainCommand()
Get mainCommand main type.
|
SubCommandType |
getSubCommand()
Get optional mainCommand sub type.
|
String |
toString() |
private final MainCommandType mainCommand
private final SubCommandType subCommand
LiteralCommandMap.getDefaultSubCommand().public ShellCommand(MainCommandType mainCommand, SubCommandType subCommand, List<Token> arguments)
mainCommand - must not be nullsubCommand - must not be nullarguments - must not be null, may be an empty listpublic MainCommandType getMainCommand()
public SubCommandType getSubCommand()
LiteralCommandMap.getDefaultSubCommand()
will be returned.public List<Token> getArguments()
Copyright © 2014 Sven Strittmatter. All Rights Reserved.