是儿童班
//n o w j a v a . c o m 提供 //package com.nowjava; import java.util.HashMap; public class Main { private static HashMap<Class<?>, Class<?>> primativeClassMap = new HashMap<Class<?>, Class<?>>(); private static boolean isChildClass(Class<?> origClass, Class<?> dstClass) { if (dstClass == null) return true; if (origClass.isInterface()) {/** N o w J a v a . c o m 提供 **/ for (Class<?> i : dstClass.getInterfaces()) { if (origClass == i) return true; } } if (origClass.isPrimitive() && (primativeClassMap.get(origClass) == dstClass)) return true; for (; dstClass != Object.