try {
for (int i = 0; i < paramCount; i++) {
params[i] = ((SimpleNode) jjtGetChild(i + 1)).value(jc);
}
VelMethod vm = Introspector.getUberspect().getMethod(obj, methodName, params, DUMMY);
/*
* 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
for (int i = 0; i < params.length; i++) {
Object param = params[i];
if (param instanceof Number) {
params[i] = narrow((Number) param);
}
}
vm = Introspector.getUberspect().getMethod(obj, methodName, params, DUMMY);
if (vm == null) {
return null;
}
}
return vm.invoke(obj, params);
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
if (t instanceof Exception) {
throw (Exception) t;