static @NotNull Variance getClassVariance(@NotNull PsiClass aClass, @NotNull PsiTypeParameter typeParameter) {
    Variance result = Variance.NOVARIANT;
    for (PsiMethod method : aClass.getAllMethods()) {
      PsiClass containingClass = method.getContainingClass();
      if (containingClass == null ||
          CommonClassNames.JAVA_LANG_OBJECT.equals(containingClass.getQualifiedName()) ||
          method.hasModifierProperty(PsiModifier.STATIC)) {
        continue;
      }
      result = result.combine(getMethodSignatureVariance(method, typeParameter));
      if (result == Variance.INVARIANT) break;
    }
    return result;
  }
static @NotNull Variance getClassVariance(@NotNull PsiClass aClass, @NotNull PsiTypeParameter typeParameter)