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);