Package de.odysseus.el.util

Examples of de.odysseus.el.util.SimpleContext$Functions


  SimpleContext context;
 
  @Override
  protected void setUp() throws Exception {
    context = new SimpleContext(new SimpleResolver());
   
    // variables var_long_1, indentifier_string
    context.setVariable("var_long_1", new ObjectValueExpression(1l, long.class));
    context.setVariable("indentifier_string", new ObjectValueExpression("foo", String.class));
    context.setVariable("var_method_1", new ObjectValueExpression(getClass().getMethod("method_1"), Method.class));
View Full Code Here


 
  SimpleContext context;
 
  @Override
  protected void setUp() throws Exception {
    context = new SimpleContext();
   
    // functions ns:f0(), ns:f1(int), ns:f2(int)
    context.setFunction("ns", "f0", getClass().getMethod("foo"));
    context.setFunction("ns", "f1", getClass().getMethod("bar", new Class[]{int.class}));
    context.setFunction("ns", "f2", getClass().getMethod("foobar", new Class[]{int.class, int.class}));
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

  SimpleContext context;
 
  @Override
  protected void setUp() throws Exception {
    context = new SimpleContext(new SimpleResolver());
   
    TypeConverter converter = TypeConverter.DEFAULT;
   
    // variables var_long_1, indentifier_string
    context.setVariable("var_long_1", new ObjectValueExpression(converter, 1l, long.class));
View Full Code Here

 
  SimpleContext context;
 
  @Override
  protected void setUp() throws Exception {
    context = new SimpleContext();
   
    // functions ns:f0(), ns:f1(int), ns:f2(int)
    context.setFunction("ns", "f0", getClass().getMethod("foo"));
    context.setFunction("ns", "f1", getClass().getMethod("bar", new Class[]{int.class}));
    context.setFunction("ns", "f2", getClass().getMethod("foobar", new Class[]{int.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

        return context;
    }

    protected void setVariable(ELContext context, String name, Object value, Class<?> type) {
        ValueExpression valueExpression = getExpressionFactory().createValueExpression(value, type);
        SimpleContext simpleContext = (SimpleContext) context;
        simpleContext.setVariable(name, valueExpression);
    }
View Full Code Here

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

        return context;
    }

    protected void setVariable(ELContext context, String name, Object value, Class<?> type) {
        ValueExpression valueExpression = getExpressionFactory().createValueExpression(value, type);
        SimpleContext simpleContext = (SimpleContext) context;
        simpleContext.setVariable(name, valueExpression);
    }
View Full Code Here

TOP

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

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.