Package de.dlr.proseo.ui.cli.parser
Class ParsedCommand
java.lang.Object
de.dlr.proseo.ui.cli.parser.ParsedCommand
Class representing a parsed command line command
- Author:
- Dr. Thomas Bassler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Gets the parsed command's nameGets the parsed command's optionsGets the parsed command's parametersGets the parsed command's subcommandGets the parsed command's syntax commandbooleanCheck, whether the "help" option was setvoidSets the parsed command's namevoidsetOptions(List<ParsedOption> options) Sets the parsed command's optionsvoidsetParameters(List<ParsedParameter> parameters) Sets the parsed command's parametersvoidsetSubcommand(ParsedCommand subcommand) Sets the parsed command's subcommandvoidsetSyntaxCommand(CLICommand syntaxCommand) Sets the parsed command's syntax commandtoString()Returns a String representation of the parsed command
-
Constructor Details
-
ParsedCommand
public ParsedCommand()
-
-
Method Details
-
getName
Gets the parsed command's name- Returns:
- the name
-
setName
Sets the parsed command's name- Parameters:
name- the name to set
-
getSubcommand
Gets the parsed command's subcommand- Returns:
- the subcommand
-
setSubcommand
Sets the parsed command's subcommand- Parameters:
subcommand- the subcommand to set
-
getOptions
Gets the parsed command's options- Returns:
- the options
-
setOptions
Sets the parsed command's options- Parameters:
options- the options to set
-
isHelpRequested
public boolean isHelpRequested()Check, whether the "help" option was set- Returns:
- true, if help was requested, false otherwise
-
getParameters
Gets the parsed command's parameters- Returns:
- the parameters
-
setParameters
Sets the parsed command's parameters- Parameters:
parameters- the parameters to set
-
getSyntaxCommand
Gets the parsed command's syntax command- Returns:
- the syntaxCommand
-
setSyntaxCommand
Sets the parsed command's syntax command- Parameters:
syntaxCommand- the syntaxCommand to set
-
toString
Returns a String representation of the parsed command
-