Package com.aspectran.shell.command
Class CommandLineParser
- java.lang.Object
-
- com.aspectran.shell.command.CommandLineParser
-
public class CommandLineParser extends java.lang.Object
The 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.String
getCommandLine()
java.lang.String
getCommandName()
java.util.List<OutputRedirection>
getRedirectionList()
Returns a list of the output redirection extracted from the command line.boolean
hasArgs()
ParsedOptions
parseOptions(Options options)
void
setCommandName(java.lang.String commandName)
void
shift()
-
-
-
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
-
-