Examples of JXPathExpressionFactory


Examples of com.volantis.xml.expression.impl.jxpath.JXPathExpressionFactory

            return 0;
        }
    }
   
    public void testParameters() throws Exception {
        ExpressionFactory factory = new JXPathExpressionFactory();
        TestFunction testFunction = new TestFunction(factory);
        // @todo later fix parameters
        ExpressionContext context = factory.createExpressionContext(null, null);
        JXPathExpressionFunctionAdapter adapter =
                new JXPathExpressionFunctionAdapter(factory,
                                                    testFunction,
                                                    context);
        Item[] items = {factory.createIntValue(1),
                        factory.createIntValue(2),
                        factory.createStringValue("3")};
        int[] ints = {42, 255, 7};
        String[] strings = {"ho", "ho", "little", "boy"};
        Object[] paramList = {new Integer(0),
                              "fred",
                              new Double(2.4),
                              new String(),
                              new Boolean(true),
                              factory.createBooleanValue(false),
                              factory.createSequence(items),
                              factory.createStringValue("abc"),
                              ints,
                              strings,
                              items};
        Value result = (Value)adapter.invoke(
            new TestExpressionContext(), paramList);
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.