XClass xClass = vm.getClassProvider().getXClass(className);
method = xClass.getMethod(methodName, methodParams, methodReturn);
XChecks.checkAccess(methodExecutor.getMethod().getDeclaringClass(), method);
if(generics==null){
if(method.getGenericParams()!=0)
throw new XRuntimeException("Can't create a generic method %s without generic params, need %s generic params", method, method.getGenericParams());
}else if(generics.length!=method.getGenericParams()){
throw new XRuntimeException("Can't create a generic method %s with %s generic params, need %s generic params", method, generics.length, method.getGenericParams());
}
if(XModifier.isStatic(method.getModifier())){
throw new XRuntimeException("Method %s is static", method);
}
}
}