I'd put this code in method info, and call:

```
methodInfo.setParameter(i, values[i]);
```