Class SimpleCommand

java.lang.Object
org.variantsync.diffdetective.shell.ShellCommand
org.variantsync.diffdetective.shell.SimpleCommand

public class SimpleCommand extends ShellCommand
Single executable command with arguments.
  • Field Details

    • parts

      private final String[] parts
  • Constructor Details

    • SimpleCommand

      public SimpleCommand(String... cmd)
      Constructs a single command. The first argument has to be a path to an executable which will be given all of the remaining arguments as parameters on execution.
      Parameters:
      cmd - executable path and arguments for the executable
  • Method Details

    • parts

      public String[] parts()
      Description copied from class: ShellCommand
      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"]

      Specified by:
      parts in class ShellCommand
      Returns:
      the parts of the shell command.