public class AeshCommandLineParser<C extends Command> extends Object implements CommandLineParser<C>
CommandLine
It can also print a formatted usage/help information.| Constructor and Description |
|---|
AeshCommandLineParser(ProcessedCommand<C> processedCommand) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildParser(CommandLineParser<? extends Command> commandLineParser) |
void |
clear() |
boolean |
equals(Object o) |
List<CommandLineParser<? extends Command>> |
getAllChildParsers() |
List<String> |
getAllNames() |
CommandLineParser<? extends Command> |
getChildParser(String name) |
C |
getCommand() |
CommandPopulator |
getCommandPopulator() |
CommandLineCompletionParser |
getCompletionParser() |
ProcessedCommand<C> |
getProcessedCommand() |
int |
hashCode() |
boolean |
isChild() |
boolean |
isGroupCommand() |
CommandLine<? extends Command> |
parse(AeshLine line,
boolean ignoreRequirements) |
CommandLine<? extends Command> |
parse(List<String> lines,
boolean ignoreRequirements)
Parse a command line with the defined command as base of the rules.
|
CommandLine<? extends Command> |
parse(String line)
Parse a command line with the defined command as base of the rules.
|
CommandLine<? extends Command> |
parse(String line,
boolean ignoreRequirements)
Parse a command line with the defined command as base of the rules.
|
String |
printHelp()
Returns a usage String based on the defined command and options.
|
void |
setChild(boolean child) |
String |
toString() |
public AeshCommandLineParser(ProcessedCommand<C> processedCommand)
public void addChildParser(CommandLineParser<? extends Command> commandLineParser)
addChildParser in interface CommandLineParser<C extends Command>public void setChild(boolean child)
setChild in interface CommandLineParser<C extends Command>public List<String> getAllNames()
getAllNames in interface CommandLineParser<C extends Command>public boolean isChild()
public CommandLineParser<? extends Command> getChildParser(String name)
getChildParser in interface CommandLineParser<C extends Command>name - commandpublic List<CommandLineParser<? extends Command>> getAllChildParsers()
getAllChildParsers in interface CommandLineParser<C extends Command>public ProcessedCommand<C> getProcessedCommand()
getProcessedCommand in interface CommandLineParser<C extends Command>public C getCommand()
getCommand in interface CommandLineParser<C extends Command>public CommandLineCompletionParser getCompletionParser()
getCompletionParser in interface CommandLineParser<C extends Command>public CommandPopulator getCommandPopulator()
getCommandPopulator in interface CommandLineParser<C extends Command>public String printHelp()
printHelp in interface CommandLineParser<C extends Command>public CommandLine<? extends Command> parse(String line)
CommandLine object where
they can be queried after.parse in interface CommandLineParser<C extends Command>line - inputpublic CommandLine<? extends Command> parse(AeshLine line, boolean ignoreRequirements)
parse in interface CommandLineParser<C extends Command>public CommandLine<? extends Command> parse(String line, boolean ignoreRequirements)
CommandLine object where
they can be queried after.parse in interface CommandLineParser<C extends Command>line - inputignoreRequirements - if we should ignorepublic CommandLine<? extends Command> parse(List<String> lines, boolean ignoreRequirements)
parse in interface CommandLineParser<C extends Command>lines - inputignoreRequirements - if we should ignorepublic void clear()
clear in interface CommandLineParser<C extends Command>public boolean isGroupCommand()
isGroupCommand in interface CommandLineParser<C extends Command>Copyright © 2018 JBoss by Red Hat. All rights reserved.