Lines Matching refs:command

51  * <li>a <i>command</i>, a list of strings which signifies the
53 * Which string lists represent a valid operating system command is
56 * systems where programs are expected to tokenize command line
75 * #start()} will fail. For example, setting the command attribute to
115 private List<String> command;
124 * make a copy of the {@code command} list. Subsequent
127 * {@code command} corresponds to a valid operating system
128 * command.
130 * @param command the list containing the program and its arguments
133 public ProcessBuilder(List<String> command) {
134 if (command == null)
136 this.command = command;
142 * constructor that sets the process builder's command to a string
143 * list containing the same strings as the {@code command}
145 * {@code command} corresponds to a valid operating system
146 * command.
148 * @param command a string array containing the program and its arguments
150 public ProcessBuilder(String... command) {
151 this.command = new ArrayList<>(command.length);
152 for (String arg : command)
153 this.command.add(arg);
159 * {@code command} list. Subsequent updates to the list will
161 * checked whether {@code command} corresponds to a valid
162 * operating system command.
164 * @param command the list containing the program and its arguments
169 public ProcessBuilder command(List<String> command) {
170 if (command == null)
172 this.command = command;
178 * arguments. This is a convenience method that sets the command
180 * {@code command} array, in the same order. It is not
181 * checked whether {@code command} corresponds to a valid
182 * operating system command.
184 * @param command a string array containing the program and its arguments
187 public ProcessBuilder command(String... command) {
188 this.command = new ArrayList<>(command.length);
189 for (String arg : command)
190 this.command.add(arg);
202 public List<String> command() {
203 return command;
455 * behavior of most operating system command interpreters (shells).
834 * command interpreters, or the standard C library function
888 * invoke the command and arguments given by {@link #command()},
892 * <p>This method checks that the command is a valid operating
893 * system command. Which commands are valid is system-dependent,
894 * but at the very least the command must be a non-empty list of
905 * {@code command} array as its argument. This may result in
926 * if an element of the command list is null
929 * if the command is an empty list (has size {@code 0})
947 String[] cmdarray = command.toArray(new String[command.size()]);
953 // Throws IndexOutOfBoundsException if command is empty