Here you can find the source of isCollectionType(Class
public static <T> boolean isCollectionType(Class<T> type)
//package com.java2s; //License from project: Open Source License import java.util.Collection; import java.util.Map; public class Main { public static <T> boolean isCollectionType(Class<T> type) { return Collection.class.isAssignableFrom(type) || Map.class.isAssignableFrom(type); }/*from w w w. j a v a 2 s.c om*/ }