예제 #1
0
 private static void findAllInterfaceTypes(
     Map results, ParameterizedType p, Configuration configuration) {
   Type superType = p.superclassType();
   if (superType == null) return;
   addAllInterfaceTypes(
       results,
       superType,
       superType instanceof ClassDoc
           ? ((ClassDoc) superType).interfaceTypes()
           : ((ParameterizedType) superType).interfaceTypes(),
       false,
       configuration);
 }
예제 #2
0
 private Type[] getInterfaceTypeArguments(ClassDoc iface, Type t) {
   if (t instanceof ParameterizedType) {
     ParameterizedType pt = (ParameterizedType) t;
     if (iface != null && iface.equals(t.asClassDoc())) {
       return pt.typeArguments();
     } else {
       for (Type pti : pt.interfaceTypes()) {
         Type[] result = getInterfaceTypeArguments(iface, pti);
         if (result != null) return result;
       }
       if (pt.superclassType() != null)
         return getInterfaceTypeArguments(iface, pt.superclassType());
     }
   } else if (t instanceof ClassDoc) {
     ClassDoc cd = (ClassDoc) t;
     for (Type pti : cd.interfaceTypes()) {
       Type[] result = getInterfaceTypeArguments(iface, pti);
       if (result != null) return result;
     }
     if (cd.superclassType() != null) return getInterfaceTypeArguments(iface, cd.superclassType());
   }
   return null;
 }