private static boolean mentionTypeParameters(PsiMethod method) {
    PsiClass containingClass = method.getContainingClass();
    if (containingClass == null) return false;
    Set<PsiTypeParameter> typeParameters = ContainerUtil.newHashSet(PsiUtil.typeParametersIterable(containingClass));
    for (PsiParameter parameter : method.getParameterList().getParameters()) {
      if (PsiTypesUtil.mentionsTypeParameters(parameter.getType(), typeParameters)) return true;
    }
    return PsiTypesUtil.mentionsTypeParameters(method.getReturnType(), typeParameters);
  }
private static boolean mentionTypeParameters(PsiMethod method)