Here you can find the source of toClasses(final Object... parameters)
public static final Class[] toClasses(final Object... parameters)
//package com.java2s; //License from project: Open Source License public class Main { public static final Class[] toClasses(final Object... parameters) { if (parameters == null || parameters.length == 0) { return new Class[0]; }/* w ww . jav a2s.co m*/ final Class[] parameterTypes = new Class[parameters.length]; for (int i = parameters.length - 1; i >= 0; i--) { if (parameters[i] == null) { parameterTypes[i] = null; } else { parameterTypes[i] = parameters[i].getClass(); } } return parameterTypes; } }