Here you can find the source of isCollection(Object obj)
public static boolean isCollection(Object obj)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { public static boolean isCollection(Object obj) { if (obj != null && Collection.class.isAssignableFrom(obj.getClass())) { return true; }/*from w w w .j a v a2 s. c o m*/ return false; } public static Class<?> getClass(String type) { Class<?> result = null; try { result = Class.forName(type); } catch (Exception e) { } return result; } }