code: private void processInterface(ClassDoc cd) {
          ClassDoc[] intfacs = cd.interfaces();
          if (intfacs.length > 0) {
              for (ClassDoc intfac : intfacs) {
                  if (!add(subinterfaces, intfac, cd)) {
                      return;
                  } else {
                      processInterface(intfac);   // Recurse
                  }
              }
          } else {
              // we need to add all the interfaces who do not have
              // super-interfaces to baseinterfaces list to traverse them
              if (!baseinterfaces.contains(cd)) {
                  baseinterfaces.add(cd);
              }
          }
      }
docs: For the interface passed get the interfaces which it extends, and then
  put this interface in the sub-interface list of those interfaces. Do it
  recursively. If a interface doesn't have super-interface just attach
  that interface in the list of all the baseinterfaces.
  
  @param cd Interface under consideration.