Package de.odysseus.el.util

Examples of de.odysseus.el.util.SimpleContext


                add(new MapELResolver(false));
                add(new ResourceBundleELResolver());
                add(new BeanAndMethodELResolver());
            }
        };
        return new SimpleContext(resolver);
    }
View Full Code Here


  public void testCoerceToType() {
    assertEquals("1", factory.coerceToType(1l, String.class));
  }

  public void testCreateTreeValueExpression() {
    SimpleContext context = new SimpleContext(new SimpleResolver());
    assertEquals(1l, factory.createValueExpression(context, "${1}", Object.class).getValue(context));
  }
View Full Code Here

    SimpleContext context = new SimpleContext(new SimpleResolver());
    assertEquals(1l, factory.createValueExpression(context, "${1}", Object.class).getValue(context));
  }

  public void testCreateObjectValueExpression() {
    SimpleContext context = new SimpleContext(new SimpleResolver());
    assertEquals("1", factory.createValueExpression("1", Object.class).getValue(context));
  }
View Full Code Here

    SimpleContext context = new SimpleContext(new SimpleResolver());
    assertEquals("1", factory.createValueExpression("1", Object.class).getValue(context));
  }

  public void testCreateMethodExpression() throws NoSuchMethodException {
    SimpleContext context = new SimpleContext(new SimpleResolver());
    context.getELResolver().setValue(context, null, "foo", this);
    assertEquals(bar(), factory.createMethodExpression(context, "${foo.bar}", null, new Class[0]).invoke(context, null));
  }
View Full Code Here

  SimpleContext context;
  TreeStore store = new TreeStore(new Builder(), null);
 
  @Override
  protected void setUp() throws Exception {
    context = new SimpleContext(new SimpleResolver(new BeanELResolver()));
    context.getELResolver().setValue(context, null, "base", this);

    // variables var_long_1, var_long_2
    context.setVariable("var_long_1", new TreeValueExpression(store, null, null, "${1}", long.class));
    context.setVariable("var_long_2", new TreeValueExpression(store, null, null, "${1}", long.class));
View Full Code Here

  SimpleContext context;
  TreeStore store = new TreeStore(new Builder(), null);
 
  @Override
  protected void setUp() throws Exception {
    context = new SimpleContext(new SimpleResolver(new BeanELResolver()));
    context.getELResolver().setValue(context, null, "base", this);
  }
View Full Code Here

  private SimpleContext context;
 
  @Override
  protected void setUp() throws Exception {
    context = new SimpleContext();
   
    // function ns:f()
    context.setFunction("ns", "f", BindingsTest.class.getMethod("foo"));

    // function g()
View Full Code Here

  private SimpleContext context;
 
  @Override
  protected void setUp() throws Exception {
    context = new SimpleContext();
   
    // functions ns:f0(), ns:f1(int)
    context.setFunction("ns", "f0", TreeTest.class.getMethod("foo"));
    context.setFunction("ns", "f1", TreeTest.class.getMethod("bar", new Class[]{int.class}));
View Full Code Here

{
    private SimpleContext simpleContext;

    public DefaultELContext(ELResolver elResolver)
    {
        this.simpleContext = new SimpleContext(elResolver);
    }
View Full Code Here

{
    private SimpleContext simpleContext;

    public TestELContext(ELResolver elResolver)
    {
        this.simpleContext = new SimpleContext(elResolver);
    }
View Full Code Here

TOP

Related Classes of de.odysseus.el.util.SimpleContext

Copyright © 2018 www.massapicom. 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.