Here you can find the source of isCollection(Class
public static <T> boolean isCollection(Class<T> cls)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static <T> boolean isCollection(Class<T> cls) { return Collection.class.isAssignableFrom(cls); }//from ww w . j a va 2 s . c o m }