Here you can find the source of containsAssignableClass( Collection
public static boolean containsAssignableClass( Collection<Class<?>> clses, Class<?> clazz)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { public static boolean containsAssignableClass( Collection<Class<?>> clses, Class<?> clazz) { for (Class<?> cls : clses) { if (cls.isAssignableFrom(clazz)) { return true; }/*from ww w. j a va2 s. c om*/ } return false; } public static boolean containsAssignableClass(Class<?>[] clses, Class<?> clazz) { for (Class<?> cls : clses) { if (cls.isAssignableFrom(clazz)) { return true; } } return false; } }