Package javax.el

Examples of javax.el.MethodExpression.invoke()


    }
   
    public void testInvokeWithVarArgsAABB() throws Exception {
        MethodExpression me5 = factory.createMethodExpression(context,
                "${beanC.sayHello(beanAA,beanBB,beanBB)}", null , null);
        Object r5 = me5.invoke(context, null);
        assertEquals("ABB[]: Hello AA from BB, BB", r5.toString());
    }
   
    public void testInvokeWithVarArgsAABBB() throws Exception {
        MethodExpression me6 = factory.createMethodExpression(context,
View Full Code Here


    }
   
    public void testInvokeWithVarArgsAABBB() throws Exception {
        MethodExpression me6 = factory.createMethodExpression(context,
                "${beanC.sayHello(beanAA,beanBBB,beanBBB)}", null , null);
        Object r6 = me6.invoke(context, null);
        assertEquals("ABB[]: Hello AA from BBB, BBB", r6.toString());
    }
   
    public void testInvokeWithVarArgsAAAB() throws Exception {
        MethodExpression me7 = factory.createMethodExpression(context,
View Full Code Here

    public void testInvokeWithVarArgsAAAB() throws Exception {
        MethodExpression me7 = factory.createMethodExpression(context,
                "${beanC.sayHello(beanAAA,beanB,beanB)}", null , null);
        Exception e = null;
        try {
            me7.invoke(context, null);
        } catch (Exception e1) {
            e = e1;
        }
        // Expected to fail
        assertNotNull(e);
View Full Code Here

    }
   
    public void testInvokeWithVarArgsAAABB() throws Exception {
        MethodExpression me8 = factory.createMethodExpression(context,
                "${beanC.sayHello(beanAAA,beanBB,beanBB)}", null , null);
        Object r8 = me8.invoke(context, null);
        assertEquals("ABB[]: Hello AAA from BB, BB", r8.toString());
    }
   
    public void testInvokeWithVarArgsAAABBB() throws Exception {
        MethodExpression me9 = factory.createMethodExpression(context,
View Full Code Here

    }
   
    public void testInvokeWithVarArgsAAABBB() throws Exception {
        MethodExpression me9 = factory.createMethodExpression(context,
                "${beanC.sayHello(beanAAA,beanBBB,beanBBB)}", null , null);
        Object r9 = me9.invoke(context, null);
        assertEquals("ABB[]: Hello AAA from BBB, BBB", r9.toString());
    }
   
    /*
     * This is also tested implicitly in numerous places elsewhere in this
View Full Code Here

    public void testBug49655() throws Exception {
        // This is the call the failed
        MethodExpression me = factory.createMethodExpression(context,
                "#{beanA.setName('New value')}", null, null);
        // The rest is to check it worked correctly
        me.invoke(context, null);
        ValueExpression ve = factory.createValueExpression(context,
                "#{beanA.name}", java.lang.String.class);
        assertEquals("New value", ve.getValue(context));
    }
   
View Full Code Here

    }
   
    public void testBugPrimitives() throws Exception {
        MethodExpression me = factory.createMethodExpression(context,
                "${beanA.setValLong(5)}", null, null);
        me.invoke(context, null);
        ValueExpression ve = factory.createValueExpression(context,
                "#{beanA.valLong}", java.lang.String.class);
        assertEquals("5", ve.getValue(context));
    }
   
View Full Code Here

    }
   
    public void testBug50449a() throws Exception {
        MethodExpression me1 = factory.createMethodExpression(context,
                "${beanB.sayHello()}", null, null);
        String actual = (String) me1.invoke(context, null);
        assertEquals("Hello from B", actual);
    }

    public void testBug50449b() throws Exception {
        MethodExpression me1 = factory.createMethodExpression(context,
View Full Code Here

    }

    public void testBug50449b() throws Exception {
        MethodExpression me1 = factory.createMethodExpression(context,
                "${beanB.sayHello('Tomcat')}", null, null);
        String actual = (String) me1.invoke(context, null);
        assertEquals("Hello Tomcat from B", actual);
    }
}
View Full Code Here

    public Object invoke(ELContext context, Object[] params)
    {
        MethodExpression me = getMethodExpression(context);
        if (me != null)
        {       
            return me.invoke(context, params);
        }
        return null;
    }

    @Override
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.