Here you can find the source of IS_CASTABLE_LIST(Class> className, Object obj)
public static boolean IS_CASTABLE_LIST(Class<?> className, Object obj)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static boolean IS_CASTABLE_LIST(Class<?> className, Object obj) { if (!(obj instanceof List)) return false; for (Object o : (List<?>) obj) if (!className.isInstance(o)) return false; return true; }/* w ww . j ava 2s . c o m*/ }