Package javax.el

Examples of javax.el.MethodExpression.invoke()


      MethodExpression methodExpression =
          expressionFactory.createMethodExpression(context, value, Void.TYPE,
              new Class<?>[]
              { ActionEvent.class });
      methodExpression.invoke(context, new Object[]{ event });
    }

  }
 
  /**
 
View Full Code Here


        assertEquals("B", me1.invoke(context, null));
        assertEquals("Hello JUnit from B", me2.invoke(context, null));
        assertEquals("Hello JUnit from B",
                me2.invoke(context, new Object[] { "JUnit2" }));
        assertEquals("Hello JUnit2 from B",
                me3.invoke(context, new Object[] { "JUnit2" }));
        assertEquals("Hello JUnit from B",
                me2.invoke(context, new Object[] { null }));
        assertEquals("Hello null from B",
                me3.invoke(context, new Object[] { null }));
    }
View Full Code Here

        assertEquals("Hello JUnit2 from B",
                me3.invoke(context, new Object[] { "JUnit2" }));
        assertEquals("Hello JUnit from B",
                me2.invoke(context, new Object[] { null }));
        assertEquals("Hello null from B",
                me3.invoke(context, new Object[] { null }));
    }

    public void testInvokeWithSuper() {
        MethodExpression me = factory.createMethodExpression(context,
                "${beanA.setBean(beanBB)}", null ,
View Full Code Here

    public void testInvokeWithSuper() {
        MethodExpression me = factory.createMethodExpression(context,
                "${beanA.setBean(beanBB)}", null ,
                new Class<?>[] { TesterBeanB.class });
        me.invoke(context, null);
        ValueExpression ve = factory.createValueExpression(context,
                "${beanA.bean.name}", String.class);
        Object r = ve.getValue(context);
        assertEquals("BB", r);
    }
View Full Code Here

    }
   
    public void testInvokeWithSuperABNoReturnTypeNoParamTypes() {
        MethodExpression me2 = factory.createMethodExpression(context,
                "${beanC.sayHello(beanA,beanB)}", null , null);
        Object r2 = me2.invoke(context, null);
        assertEquals("AB: Hello A from B", r2.toString());
    }
   
    public void testInvokeWithSuperABReturnTypeNoParamTypes() {
        MethodExpression me3 = factory.createMethodExpression(context,
View Full Code Here

    }
   
    public void testInvokeWithSuperABReturnTypeNoParamTypes() {
        MethodExpression me3 = factory.createMethodExpression(context,
                "${beanC.sayHello(beanA,beanB)}", String.class , null);
        Object r3 = me3.invoke(context, null);
        assertEquals("AB: Hello A from B", r3.toString());
    }
   
    public void testInvokeWithSuperABNoReturnTypeParamTypes() {
        MethodExpression me4 = factory.createMethodExpression(context,
View Full Code Here

   
    public void testInvokeWithSuperABNoReturnTypeParamTypes() {
        MethodExpression me4 = factory.createMethodExpression(context,
                "${beanC.sayHello(beanA,beanB)}", null ,
                new Class<?>[] {TesterBeanA.class, TesterBeanB.class});
        Object r4 = me4.invoke(context, null);
        assertEquals("AB: Hello A from B", r4.toString());
    }
   
    public void testInvokeWithSuperABReturnTypeParamTypes() {
        MethodExpression me5 = factory.createMethodExpression(context,
View Full Code Here

   
    public void testInvokeWithSuperABReturnTypeParamTypes() {
        MethodExpression me5 = factory.createMethodExpression(context,
                "${beanC.sayHello(beanA,beanB)}", String.class ,
                new Class<?>[] {TesterBeanA.class, TesterBeanB.class});
        Object r5 = me5.invoke(context, null);
        assertEquals("AB: Hello A from B", r5.toString());
    }
   
    public void testInvokeWithSuperABB() {
        MethodExpression me6 = factory.createMethodExpression(context,
View Full Code Here

    }
   
    public void testInvokeWithSuperABB() {
        MethodExpression me6 = factory.createMethodExpression(context,
                "${beanC.sayHello(beanA,beanBB)}", null , null);
        Object r6 = me6.invoke(context, null);
        assertEquals("ABB: Hello A from BB", r6.toString());
    }
   
    public void testInvokeWithSuperABBB() {
        MethodExpression me7 = factory.createMethodExpression(context,
View Full Code Here

    }
   
    public void testInvokeWithSuperABBB() {
        MethodExpression me7 = factory.createMethodExpression(context,
                "${beanC.sayHello(beanA,beanBBB)}", null , null);
        Object r7 = me7.invoke(context, null);
        assertEquals("ABB: Hello A from BBB", r7.toString());
    }
   
    public void testInvokeWithSuperAAB() {
        MethodExpression me8 = factory.createMethodExpression(context,
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.