Exemplo n.º 1
0
 @Override
 public void visit(ExecArg arg) {
   if (arg.isList()) {
     CommandVisitor commandVisitor = new CommandVisitor(new ArrayList<String>(), quote, expand);
     for (ExecArg execArg : arg.getList()) {
       execArg.accept(commandVisitor);
     }
     String join = joinAndQuote(commandVisitor.getCommandList(), arg.isQuoted() ? quote : null);
     getCommandList().add(join);
   } else {
     getCommandList().add(convertAndQuote(arg.getString(), arg.isQuoted()));
   }
 }