Package de.odysseus.el.tree

Examples of de.odysseus.el.tree.Tree.bind()


    tree = parse("${ns:f0()}");
    assertEquals(foo(), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));

    tree = parse("${ns:f1(42)}");
    assertEquals(bar(42), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));

    tree = parse("${ns:f2(21,21)}");
    assertEquals(foobar(21,21), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));

    tree = parse("${g0()}");
View Full Code Here


    tree = parse("${ns:f1(42)}");
    assertEquals(bar(42), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));

    tree = parse("${ns:f2(21,21)}");
    assertEquals(foobar(21,21), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));

    tree = parse("${g0()}");
    assertEquals(foo(), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));

    tree = parse("${g1(42)}");
View Full Code Here

    tree = parse("${ns:f2(21,21)}");
    assertEquals(foobar(21,21), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));

    tree = parse("${g0()}");
    assertEquals(foo(), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));

    tree = parse("${g1(42)}");
    assertEquals(bar(42), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));

    tree = parse("${g2(21,21)}");
View Full Code Here

    tree = parse("${g0()}");
    assertEquals(foo(), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));

    tree = parse("${g1(42)}");
    assertEquals(bar(42), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));

    tree = parse("${g2(21,21)}");
    assertEquals(foobar(21,21), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));
  }
View Full Code Here

    tree = parse("${g1(42)}");
    assertEquals(bar(42), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));

    tree = parse("${g2(21,21)}");
    assertEquals(foobar(21,21), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));
  }

  public void testAppendStructure() {
    StringBuilder s = null;
View Full Code Here

  public void testGetValue() {
    Tree tree = null;

    tree = parse("${ns:f0()}");

    assertEquals(foo(), getNode(tree).getValue(tree.bind(context.getFunctionMapper(), null), null, null));
    assertEquals("" + foo(), getNode(tree).getValue(tree.bind(context.getFunctionMapper(), null), null, String.class));
  }
}
View Full Code Here

    Tree tree = null;

    tree = parse("${ns:f0()}");

    assertEquals(foo(), getNode(tree).getValue(tree.bind(context.getFunctionMapper(), null), null, null));
    assertEquals("" + foo(), getNode(tree).getValue(tree.bind(context.getFunctionMapper(), null), null, String.class));
  }
}
View Full Code Here

    bindings2 = new Bindings(null, null);
    assertEquals(bindings1, bindings2);
    assertEquals(bindings1.hashCode(), bindings2.hashCode());

    Tree tree = parse("${ns:f()+v+g(1)}+x");
    bindings1 = tree.bind(context.getFunctionMapper(), context.getVariableMapper());
    bindings2 = tree.bind(context.getFunctionMapper(), context.getVariableMapper());
    assertEquals(bindings1, bindings2);
    assertEquals(bindings1.hashCode(), bindings2.hashCode());
  }
}
View Full Code Here

    assertEquals(bindings1, bindings2);
    assertEquals(bindings1.hashCode(), bindings2.hashCode());

    Tree tree = parse("${ns:f()+v+g(1)}+x");
    bindings1 = tree.bind(context.getFunctionMapper(), context.getVariableMapper());
    bindings2 = tree.bind(context.getFunctionMapper(), context.getVariableMapper());
    assertEquals(bindings1, bindings2);
    assertEquals(bindings1.hashCode(), bindings2.hashCode());
  }
}
View Full Code Here

    super();

    Tree tree = store.get(expr);

    this.builder = store.getBuilder();
    this.bindings = tree.bind(functions, variables, converter);
    this.expr = expr;
    this.type = returnType;
    this.types = paramTypes;
    this.node = tree.getRoot();
    this.deferred = tree.isDeferred();
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.