Java tutorial
//package com.java2s; import java.util.List; import java.util.Map; import java.util.Set; public class Main { public static boolean isCollectionOrMap(Class type) { if (List.class.isAssignableFrom(type) || Set.class.isAssignableFrom(type) || Map.class.isAssignableFrom(type) || type.isArray()) { return true; } return false; } }