Exemple #1
0
 /**
  * Start a buidler for a sublist of args
  *
  * @param quoted true if the list should be quoted
  * @return a builder for a sublist
  */
 public Builder subList(boolean quoted) {
   Builder subbuild = new Builder();
   ArgListBuilder arg = new ArgListBuilder(subbuild);
   arg.setQuoted(quoted);
   argList.addArg(arg);
   subbuild.parent = this;
   return subbuild;
 }
Exemple #2
0
 /**
  * Add a list of args
  *
  * @param args args
  * @param quoted true if all should be quoted
  * @return builder
  */
 public Builder args(List<String> args, Predicate quoted) {
   for (String arg : args) {
     argList.addArg(arg, quoted.evaluate(arg));
   }
   return this;
 }
Exemple #3
0
 private void addArgs(List<String> arg, boolean quoted) {
   for (String s : arg) {
     addArg(s, quoted);
   }
 }
Exemple #4
0
 /**
  * Add a string arg
  *
  * @param arg argument
  * @param quoted true if it needs to be quoted
  * @return builder
  */
 public Builder arg(String arg, boolean quoted) {
   argList.addArg(arg, quoted);
   return this;
 }