Class Args

java.lang.Object
org.copalis.jam.util.Args

public class Args extends Object
A utility class for constructing vararg parameter lists.
  • Method Details

    • of

      public static Args of(String... args)
      Creates a new list with the supplied arguments
      Parameters:
      args - an arbitrary number of arguments
      Returns:
      the new list
    • and

      public Args and(String... args)
      Adds supplied arguments and returns the current list
      Parameters:
      args - an arbitrary number of arguments
      Returns:
      the current list
    • andAll

      public Args andAll(Args other)
      Adds another args list to this
      Parameters:
      other - another args
      Returns:
      the current list
    • array

      public String[] array()
      Returns the arguments as an array
      Returns:
      an array containing the vararg list
    • run

      public void run()
      Executes an external process using these arguments
    • run

      public void run(ProcessBuilder pb)
      Executes an external process using these arguments
      Parameters:
      pb - the process builder used to execute the process
    • toString

      public String toString()
      Overrides:
      toString in class Object