Package com.aspectran.shell.command
Class CommandLineParser
- java.lang.Object
-
- com.aspectran.shell.command.CommandLineParser
-
public class CommandLineParser extends java.lang.ObjectThe Command Line Parser.
-
-
Constructor Summary
Constructors Constructor Description CommandLineParser(java.lang.String commandLine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getArgs()java.lang.StringgetCommandLine()java.lang.StringgetCommandName()java.util.List<OutputRedirection>getRedirectionList()Returns a list of the output redirection extracted from the command line.booleanhasArgs()ParsedOptionsparseOptions(Options options)voidsetCommandName(java.lang.String commandName)voidshift()
-
-
-
Method Detail
-
shift
public void shift()
-
getCommandLine
public java.lang.String getCommandLine()
-
getCommandName
public java.lang.String getCommandName()
-
setCommandName
public void setCommandName(java.lang.String commandName)
-
getArgs
public java.lang.String[] getArgs()
-
hasArgs
public boolean hasArgs()
-
parseOptions
public ParsedOptions parseOptions(Options options) throws OptionParserException
- Throws:
OptionParserException
-
getRedirectionList
public java.util.List<OutputRedirection> getRedirectionList()
Returns a list of the output redirection extracted from the command line.- Returns:
- a list of the output redirection
-
-