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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.aspectran.core.activity.request.parameter.ParameterMapextractParameters()java.lang.String[]getArgs()Gets the command arguments.java.lang.StringgetCommandName()Gets the translet name.java.util.List<CommandLineRedirection>getRedirectionList()java.io.Writer[]getRedirectionWriters(Console console)com.aspectran.core.context.rule.type.MethodTypegetRequestMethod()Gets the request method.booleanhasParameters()booleanisParseArgs()static CommandLineParserparse(java.lang.String commandLine)Returns the command line parser.static CommandLineParserparse(java.lang.String commandLine, boolean parseArgs)static java.lang.Stringserialize(java.util.List<CommandLineRedirection> redirectionList)static java.lang.String[]splitCommandLine(java.lang.String commandLine)
-
-
-
Method Detail
-
isParseArgs
public boolean isParseArgs()
-
getRequestMethod
public com.aspectran.core.context.rule.type.MethodType getRequestMethod()
Gets the request method.- Returns:
- the request method
-
getCommandName
public java.lang.String getCommandName()
Gets the translet name.- Returns:
- the translet name
-
getArgs
public java.lang.String[] getArgs()
Gets the command arguments.- Returns:
- the command arguments
-
hasParameters
public boolean hasParameters()
-
extractParameters
public com.aspectran.core.activity.request.parameter.ParameterMap extractParameters()
-
getRedirectionList
public java.util.List<CommandLineRedirection> getRedirectionList()
-
getRedirectionWriters
public java.io.Writer[] getRedirectionWriters(Console console) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException
- Throws:
java.io.FileNotFoundExceptionjava.io.UnsupportedEncodingException
-
parse
public static CommandLineParser parse(java.lang.String commandLine)
Returns the command line parser.- Parameters:
commandLine- the command line- Returns:
- the command line parser
-
parse
public static CommandLineParser parse(java.lang.String commandLine, boolean parseArgs)
-
serialize
public static java.lang.String serialize(java.util.List<CommandLineRedirection> redirectionList)
-
splitCommandLine
public static java.lang.String[] splitCommandLine(java.lang.String commandLine)
-
-