Here you can find the source of cast(Object[] parameters, Class>[] types)
static Object[] cast(Object[] parameters, Class<?>[] types)
//package com.java2s; //License from project: Apache License public class Main { static Object[] cast(Object[] parameters, Class<?>[] types) { for (int i = 0; i < parameters.length; i++) { parameters[i] = types[i].cast(parameters[i]); }//from ww w.j av a2 s .c om return parameters; } }