try {
// attempt to reuse last executor cached in volatile JexlNode.value
if (cache) {
Object cached = node.jjtGetValue();
if (cached instanceof JexlMethod) {
JexlMethod me = (JexlMethod) cached;
Object eval = me.tryInvoke(function, namespace, argv);
if (!me.tryFailed(eval)) {
return eval;
}
}
}
JexlMethod vm = uberspect.getMethod(namespace, function, argv, node);
// DG: If we can't find an exact match, narrow the parameters and
// try again!
if (vm == null) {
// replace all numbers with the smallest type that will fit
if (arithmetic.narrowArguments(argv)) {
vm = uberspect.getMethod(namespace, function, argv, node);
}
if (vm == null) {
xjexl = new JexlException(node, "unknown function", null);
}
}
if (xjexl == null) {
Object eval = vm.invoke(namespace, argv); // vm cannot be null if xjexl is null
// cache executor in volatile JexlNode.value
if (cache && vm.isCacheable()) {
node.jjtSetValue(vm);
}
return eval;
}
} catch (InvocationTargetException e) {