Class ShellCommand
java.lang.Object
org.variantsync.studies.evolution.simulation.shell.ShellCommand
- Direct Known Subclasses:
CpCommand
,DiffCommand
,EchoCommand
,PatchCommand
,RmCommand
Base class for various shell commands.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.variantsync.functjonal.Result<List<String>,
ShellException> interpretResult
(int resultCode, List<String> output) Interpret the result code returned from a shell commandabstract String[]
parts()
Return the String parts that define and configure the command execution (e.g., ["echo", "Hello World"])toString()
-
Constructor Details
-
ShellCommand
public ShellCommand()
-
-
Method Details
-
parts
Return the String parts that define and configure the command execution (e.g., ["echo", "Hello World"])- Returns:
- the parts of the shell command.
-
interpretResult
public org.variantsync.functjonal.Result<List<String>,ShellException> interpretResult(int resultCode, List<String> output) Interpret the result code returned from a shell command- Parameters:
resultCode
- the code that is to be parsed- Returns:
- the result
-
toString
-