Examples of eval()


Examples of aQute.library.capreq.FilterParser.Expression.eval()

    if (f == null)
      return false;

    Expression parse = parser.parse(f);

    return parse.eval(attributes);
  }

  public RequirementImpl createRequirement(String namespace, String filter) {
    RequirementImpl req = new RequirementImpl(local, namespace);
    req.setFilter(filter);
View Full Code Here

Examples of anvil.script.expression.Expression.eval()

            }
          }
         
          Expression expr = Grammar.parseExpression(buffer.toString(), getLocation(), parser);
          if (expr.isConstant()) {
            addChild(new CharacterDataStatement(this, parser.getLocation(), expr.eval().toString()));
          } else {
            addChild(new PrintStatement(this, parser.getLocation(), expr));
          }
          buffer.setLength(0);
         
View Full Code Here

Examples of bsh.Interpreter.eval()

    Interpreter oInterpreter = new Interpreter();

    oInterpreter.set ("DomainNm", sDomainNm);
    oInterpreter.set ("DefaultConnection", oConn);

    oInterpreter.eval(getResourceAsString("scripts/domain_drop.js", sEncoding));

    Object obj = oInterpreter.get("ErrorCode");

    Integer oCodError = (Integer) oInterpreter.get("ErrorCode");
View Full Code Here

Examples of cambridge.model.Expression.eval()

   public void testList() {
      String expression = "['a', 'b', 213, aa]";
      try {
         Expression e = Expressions.parse(expression, 0, 0);
//         assertEquals("Testing type", CambridgeExpression.Type.Object, e.getType(bindings));
         assertTrue(e.eval(bindings) instanceof List);
         List l = (List) e.eval(bindings);
         assertEquals("a", l.get(0));
         assertEquals("b", l.get(1));
         assertEquals(213, l.get(2));
      } catch (ExpressionParsingException e) {
View Full Code Here

Examples of com.alibaba.druid.sql.visitor.functions.Function.eval()

        if (function == null) {
            function = functions.get(methodName);
        }

        if (function != null) {
            Object result = function.eval(visitor, x);

            if (result != SQLEvalVisitor.EVAL_ERROR) {
                x.getAttributes().put(EVAL_VALUE, result);
            }
            return false;
View Full Code Here

Examples of com.alibaba.fastjson.JSONPath.eval()

    public void test_list_map() throws Exception {
        Entity entity = new Entity(123, "wenshao");
        JSONPath path = new JSONPath("$['id']");
       
        Assert.assertSame(entity.getId(), path.eval(entity));
    }

    public static class Entity {

        private Integer id;
View Full Code Here

Examples of com.ardor3d.math.functions.Function3D.eval()

        for (int y = 0; y < side; y++) {
            for (int x = 0; x < side; x++) {
                final int index = y * side + x;

                final float h = (float) function.eval(x, y, 0);
                heightData[index] = h;

                int col = (int) (h * h * 255 * 0.6);
                col = MathUtils.clamp(col, 0, 255);
                colorData[index * 4 + 0] = (byte) (col * 1.0);
 
View Full Code Here

Examples of com.caucho.config.program.BeanArg.eval()

   
    for (int i = 0; i < _args.length; i++) {
      BeanArg arg = _args[i];

      if (arg != null)
        args[i] = arg.eval(env);
      else
        args[i] = event;
    }

    return args;
View Full Code Here

Examples of com.caucho.quercus.expr.Expr.eval()

    for (ClassField field : cl.getClassFields().values()) {
      if (field.isPublic()) {
        StringValue name = field.getName();
        Expr initValue = field.getInitValue();
       
        Value value = initValue.eval(env);

        varArray.append(name, value);
      }
    }
View Full Code Here

Examples of com.caucho.xpath.XPathFun.eval()

    for (; childNode != null; childNode = childNode.getNextSibling()) {
      if (! childNode.getNodeName().equals("item"))
        continue;

      if (docShouldDisplay != null && !Expr.toBoolean(docShouldDisplay.eval(childNode,env,null,null)))
        continue;

      Element elt = (Element) childNode;

      NavItem item = new NavItem();
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.