Example #1
0
 @Override
 public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
   final String form = string(toToken(exprs[0], qc));
   final int es = exprs.length;
   final Object[] args = new Object[es - 1];
   for (int e = 1; e < es; e++) {
     final Item it = exprs[e].item(qc, info);
     args[e - 1] = it == null ? null : it.type.isUntyped() ? string(it.string(info)) : it.toJava();
   }
   try {
     return Str.get(String.format(form, args));
   } catch (final RuntimeException ex) {
     throw ERRFORMAT_X_X.get(info, Util.className(ex), ex);
   }
 }