code: public static Class<?>[] toClassesFromObjects(final Object[] params) {
  		final Class<?>[] classes = new Class<?>[params.length];
  		int i = 0;
  		for (final Object object : params) {
  			if (object != null) {
  				classes[i++] = object.getClass();
  			} else {
  				classes[i++] = Object.class;
  			}
  		}
  		return classes;
  	}
docs: To classes from objects.
  
  @param params the params
  @return the class[]