VarianceCandidate getSuperMethodVarianceCandidate(@NotNull PsiMethod superMethod) {
    PsiParameter superMethodParameter = superMethod.getParameterList().getParameters()[this.methodParameterIndex];
    PsiType superMethodParameterType = superMethodParameter.getType();
    PsiClass paraClass = ((PsiClassType)superMethodParameterType).resolve();
    PsiTypeParameter superTypeParameter = paraClass.getTypeParameters()[typeParameterIndex];
    PsiTypeElement superMethodParameterTypeElement = superMethodParameter.getTypeElement();
    if (superMethodParameterTypeElement == null) return null; // e.g. when java overrides kotlin
    PsiJavaCodeReferenceElement ref = superMethodParameterTypeElement.getInnermostComponentReferenceElement();
    PsiTypeElement[] typeElements = ref.getParameterList().getTypeParameterElements();
    PsiType type = typeElements[this.typeParameterIndex].getType();

    return new VarianceCandidate(superMethodParameter, (PsiClassReferenceType)superMethodParameterType, superMethod, this.methodParameterIndex, superTypeParameter, type, typeParameterIndex);
  }
VarianceCandidate getSuperMethodVarianceCandidate(@NotNull PsiMethod superMethod)