Here you can find the source of isClassCollection(Class> c)
private static int isClassCollection(Class<?> c)
//package com.java2s; //License from project: Open Source License import java.util.Collection; import java.util.Map; public class Main { private static int isClassCollection(Class<?> c) { if (Collection.class.isAssignableFrom(c)) { return 1; } else if (Map.class.isAssignableFrom(c)) { return 2; } else {/* ww w. ja v a 2s.co m*/ return 0; } } }