if ((method.getModifiers() & Modifier.STATIC) != 0) {
return Expressions.call(method, translatedOperands);
} else {
// The UDF class must have a public zero-args constructor.
// Assume that the validator checked already.
final NewExpression target =
Expressions.new_(method.getDeclaringClass());
return Expressions.call(target, method, translatedOperands);
}
}