DfaValue (DfaValueFactory factory, PsiReferenceExpression refExpr) { PsiExpression qualifierExpression = refExpr.getQualifierExpression(); if (qualifierExpression == null) { PsiElement element = refExpr.resolve(); if (element instanceof PsiMember && !((PsiMember)element).hasModifierProperty(PsiModifier.STATIC)) { PsiClass currentClass = ClassUtils.getContainingClass(refExpr); PsiClass memberClass = ((PsiMember)element).getContainingClass(); if (memberClass != null && currentClass != null) { PsiClass target; PsiElement refName = refExpr.getReferenceNameElement(); if (currentClass == memberClass || (!(refName instanceof PsiKeyword && ((PsiKeyword)refName).getTokenType() == JavaTokenType.SUPER_KEYWORD) && InheritanceUtil.isInheritorOrSelf(currentClass, memberClass, true))) { target = currentClass; } else { target = memberClass; } return ThisDescriptor.createThisValue(factory, target); } } } return getQualifierValue(factory, qualifierExpression); }