statement.generate(context);
MetaClass callType = statement.getType();
MetaClass[] parameterTypes = callParams.getParameterTypes();
final MetaMethod method = (staticMethod) ? callType.getBestMatchingStaticMethod(methodName, parameterTypes)
: callType.getBestMatchingMethod(methodName, parameterTypes);
if (method == null) {
callType.getBestMatchingMethod(methodName, parameterTypes);
if (GenUtil.isPermissiveMode()) {
dummyReturn(writer, context);
return;
}
else {
throw new UndefinedMethodException(statement.getType(), methodName, parameterTypes);
}
}
if (method.getGenericParameterTypes() != null) {
MetaType[] genTypes = method.getGenericParameterTypes();
for (int i = 0; i < genTypes.length; i++) {
if (genTypes[i] instanceof MetaParameterizedType) {
if (parameters[i] instanceof MetaClass) {
MetaType type = ((MetaParameterizedType) genTypes[i]).getTypeParameters()[0];
if (type instanceof MetaTypeVariable) {