java.lang.Object
com.ibm.jvm.dtfjview.tools.ParsedCommand
This class divides the command line into the command with arguments.
If pipeline is found in the command line, it will re-organize it so that
the command before the pipe line will be placed after the command behind the
pipe line.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionString[]
To get the arguments.To get the command line combined from its command and arguments, using spaces to separate tokens.To get the command without arguments.static ParsedCommand
This is a convenient method to parse a command line.void
setArguments
(String[] arguments) To set the arguments.void
setCommand
(String command) To set the command.
-
Constructor Details
-
ParsedCommand
To construct an object.- Parameters:
command
- The command without arguments.arguments
- The arguments to the command.
-
-
Method Details
-
parse
This is a convenient method to parse a command line.- Parameters:
commandLine
- The command line. Can contain pipe lines.- Returns:
- An initialized ParsedCommand object.
-
getCommand
To get the command without arguments.- Returns:
- the command without arguments.
-
setCommand
To set the command.- Parameters:
command
- The command to be set.
-
getArguments
To get the arguments.- Returns:
- the arguments.
-
setArguments
To set the arguments.- Parameters:
arguments
- The arguments to be set.
-
getCombinedCommandLine
To get the command line combined from its command and arguments, using spaces to separate tokens.- Returns:
- the combined command line.
-