code: private <T extends ProgramElementDoc> void mapTypeParameters(Map<String,List<T>> map, Object doc,
              T holder) {
          TypeVariable[] typeVariables;
          if (doc instanceof ClassDoc) {
              typeVariables = ((ClassDoc) doc).typeParameters();
          } else if (doc instanceof WildcardType) {
              Type[] extendsBounds = ((WildcardType) doc).extendsBounds();
              for (int k = 0; k < extendsBounds.length; k++) {
                  addTypeParameterToMap(map, extendsBounds[k], holder);
              }
              Type[] superBounds = ((WildcardType) doc).superBounds();
              for (int k = 0; k < superBounds.length; k++) {
                  addTypeParameterToMap(map, superBounds[k], holder);
              }
              return;
          } else if (doc instanceof ParameterizedType) {
              Type[] typeArguments = ((ParameterizedType) doc).typeArguments();
              for (int k = 0; k < typeArguments.length; k++) {
                  addTypeParameterToMap(map, typeArguments[k], holder);
              }
              return;
          } else if (doc instanceof ExecutableMemberDoc) {
              typeVariables = ((ExecutableMemberDoc) doc).typeParameters();
          } else if (doc instanceof FieldDoc) {
              Type fieldType = ((FieldDoc) doc).type();
              mapTypeParameters(map, fieldType, holder);
              return;
          } else {
              return;
          }
          for (int i = 0; i < typeVariables.length; i++) {
              Type[] bounds = typeVariables[i].bounds();
              for (int j = 0; j < bounds.length; j++) {
                  addTypeParameterToMap(map, bounds[j], holder);
              }
          }
      }
docs: Map the ClassDocs to the ProgramElementDocs that use them as
  type parameters.
  
  @param map the map the insert the information into.
  @param doc the doc whose type parameters are being checked.
  @param holder the holder that owns the type parameters.