Class ShellCommand
java.lang.Object
org.variantsync.diffdetective.shell.ShellCommand
- Direct Known Subclasses:
PythonCommand
,SimpleCommand
Representation of an executable command.
An executable command is a path to an executable file with arguments which are provided
to that executable on execution.
- Author:
- Alexander Schultheiß
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ShellCommand
public ShellCommand()
-
-
Method Details
-
parts
Returns the String parts that define and configure the command execution. The first array entry is a path to an executable file. The others are arguments for that executable.Example: ["echo", "Hello World"]
- Returns:
- the parts of the shell command.
-
interpretResult
Interpret the result/exit code returned from a shell command. AnShellException
is thrown if the result code is an error.- Parameters:
resultCode
- the code that is to be parsedoutput
- the output of the shell command- Returns:
- the output of the shell command
- Throws:
ShellException
- ifresultCode
is an error
-
toString
-