Here you can find the source of getClasses(Object... objects)
private static Class<?>[] getClasses(Object... objects)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { private static Class<?>[] getClasses(Object... objects) { List<Class<?>> asClasses = new ArrayList<Class<?>>(); for (Object ob : objects) { if (ob == null) { continue; }/*w w w .j av a 2s. c o m*/ asClasses.add(ob.getClass()); } return asClasses.toArray(new Class[asClasses.size()]); } }