public static boolean isSubtype(ReferenceType t, ReferenceType possibleSupertype) throws ClassNotFoundException { Map<ReferenceType, Boolean> subtypes = subtypeCache.get(possibleSupertype); if (subtypes == null) { subtypes = new HashMap<ReferenceType, Boolean>(); subtypeCache.put(possibleSupertype, subtypes); } Boolean result = subtypes.get(t); if (result == null) { result = Boolean.valueOf(t.isAssignmentCompatibleWith(possibleSupertype)); subtypes.put(t, result); } return result;
public static boolean isSubtype(String clsName, String possibleSupertypeClassName) throws ClassNotFoundException { ObjectType cls = ObjectTypeFactory.getInstance(clsName); ObjectType superCls = ObjectTypeFactory.getInstance(possibleSupertypeClassName); return isSubtype(cls, superCls);
	public static boolean isSubtype(ReferenceType t, ReferenceType possibleSupertype) throws ClassNotFoundException {		Map<ReferenceType, Boolean> subtypes = subtypeCache.get(possibleSupertype);		if (subtypes == null) {			subtypes = new HashMap<ReferenceType, Boolean>();			subtypeCache.put(possibleSupertype, subtypes);		}		Boolean result = subtypes.get(t);		if (result == null) {			result = Boolean.valueOf(t.isAssignmentCompatibleWith(possibleSupertype));			subtypes.put(t, result);		}		return result;	}