Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 3
0
 private void addArgs(List<String> arg, boolean quoted) {
   for (String s : arg) {
     addArg(s, quoted);
   }
 }
Ejemplo n.º 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;
 }