/** * Test whether type names can be assigned to type infos * * @param tif the type info factory * @param cl bean classloader * @param typeNames the type names * @param typeInfos the type infos * @return true when they can be assigned * @throws Throwable for any error */ @SuppressWarnings("unchecked") public static boolean isAssignable(TypeInfoFactory tif, ClassLoader cl, String[] typeNames, TypeInfo[] typeInfos) throws Throwable { if (cl == null) return false; if (simpleCheck(typeNames, typeInfos) == false) return false; for (int i = 0; i < typeNames.length; ++i) { if (typeNames[i] != null) { if (typeInfos[i].isAssignableFrom(tif.getTypeInfo(typeNames[i], cl)) == false) { return false; } } } return true; }