- java.lang.Object
-
- com.ibm.jvm.dtfjview.tools.ParsedCommand
-
public class ParsedCommand extends Object
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
Constructors Constructor Description ParsedCommand(String command, String[] arguments)
To construct an object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getArguments()
To get the arguments.String
getCombinedCommandLine()
To get the command line combined from its command and arguments, using spaces to separate tokens.String
getCommand()
To get the command without arguments.static ParsedCommand
parse(String commandLine)
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.
-
-
-
Method Detail
-
parse
public static ParsedCommand parse(String commandLine)
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
public String getCommand()
To get the command without arguments.- Returns:
- the command without arguments.
-
setCommand
public void setCommand(String command)
To set the command.- Parameters:
command
- The command to be set.
-
getArguments
public String[] getArguments()
To get the arguments.- Returns:
- the arguments.
-
setArguments
public void setArguments(String[] arguments)
To set the arguments.- Parameters:
arguments
- The arguments to be set.
-
getCombinedCommandLine
public String getCombinedCommandLine()
To get the command line combined from its command and arguments, using spaces to separate tokens.- Returns:
- the combined command line.
-
-