Examples of eval()


Examples of us.monoid.web.jp.javacc.JSONPathCompiler.JSONPathExpr.eval()

  @Test
  public void testJSONPathCompiler() throws ParseException, JSONException {
    System.out.println(this.getClass().getResource("books.json"));
    JSONObject json = read(this.getClass().getResource("books.json"));
    JSONPathExpr evaluator = parse("store.book[0].author");
    Object result = evaluator.eval(json);
    System.out.println(result);
    assertEquals("Nigel Rees", result);
   
    evaluator = parse("store.book[category='fiction'].author");
    result = evaluator.eval(json);
View Full Code Here

Examples of vdoclet.Generator.eval()

     */
    private void generate() throws Exception {
        Generator generator = new Generator(destDir);
        generator.setAttribute("docInfo", docInfo);
        generator.setAttribute("toolbox", new Toolbox());
        generator.eval(template,
                        new OutputStreamWriter(System.out));
    }

}

View Full Code Here

Examples of xbird.xquery.expr.XQExpression.eval()

                    String selected = (String) cell.getUserObject();
                    XQExpression expr = sourceExprMap.get(selected);
                    DynamicContext dynEnv = new DynamicContext(statEnv);
                    final Sequence result;
                    try {
                        result = expr.eval(ValueSequence.EMPTY_SEQUENCE, dynEnv);
                    } catch (Exception ex) {
                        JOptionPane.showMessageDialog(frame, "eval failed!: " + ex.getMessage());
                        ex.printStackTrace();
                        return;
                    }
View Full Code Here

Examples of xbird.xquery.expr.var.Variable.eval()

            throws XQueryException {
        QualifiedName varname = ref.getName();
        Variable var = ref.getValue();
        Sequence result = var.getResult();
        if(result == null) {
            result = var.eval(contextSeq, dynEnv);
        }
        ReturnType rettype = request.getReturnType();
        final ShippedVariable shiped;
        if(ENV_NOWRAP_VARSHIP || !rettype.isRemoteSequnece()) {
            shiped = new ShippedVariable(varname, new MarshalledSequence(result, dynEnv));
View Full Code Here

Examples of xbird.xquery.func.UserFunction.eval()

            ParametricVariable paramVar = params.get(i);
            XQExpression argExpr = _params.get(i);
            Sequence argValue = argExpr.eval(contextSeq, dynEnv);
            paramVar.allocateResult(argValue, recEnv);
        }
        Sequence<? extends Item> result = uf.eval(contextSeq, ValueSequence.EMPTY_SEQUENCE, recEnv);
        if(LOG.isDebugEnabled()) {
            LOG.debug("Invoke RecursiveCall: " + QNameUtil.toLexicalForm(getFuncName()));
        }
        return result;
    }
View Full Code Here

Examples of xbird.xquery.operator.math.PlusOp.eval()

                    throw new DynamicError("err:FORG0006", "fs:plus(" + sum.getType() + ", "
                            + toadd.getType() + ") is not defined.");
                }
                final PlusOp op = new PlusOp();
                op.staticAnalysis(dynEnv.getStaticContext(), sum, toadd);
                sum = (XNumber) op.eval(dynEnv, sum, toadd);
            }
            final DivOp op = new DivOp();
            final XInteger divby = XInteger.valueOf(size);
            op.staticAnalysis(dynEnv.getStaticContext(), sum, divby);
            return op.eval(dynEnv, sum, divby);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.