/** * Add the entire command, including (optional) executable to a list. * @param list the list to add to. * @since Ant 1.6 */ public void addCommandToList(ListIterator<String> list) { if (executable != null) { list.add(executable); } addArgumentsToList(list); }
/** * Returns all arguments defined by <code>addLine</code>, * <code>addValue</code> or the argument object. * @return the arguments as an array of strings. */ public String[] getArguments() { List<String> result = new ArrayList<>(arguments.size() * 2); addArgumentsToList(result.listIterator()); return result.toArray(new String[result.size()]); }