public boolean subtypeOf(CtClass clazz) throws NotFoundException { if (super.subtypeOf(clazz)) return true; String cname = clazz.getName(); if (cname.equals(javaLangObject)) return true; CtClass[] intfs = getInterfaces(); for (int i = 0; i < intfs.length; i++) if (intfs[i].subtypeOf(clazz)) return true; return clazz.isArray() && getComponentType().subtypeOf(clazz.getComponentType()); }